@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-light: #1a1a1a;
    --border: #2a2a2a;
    --text: #fafafa;
    --text-muted: #888;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Drop Zone */
.drop-zone {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--surface-light);
}

.drop-zone.drag-over {
    transform: scale(1.01);
}

.drop-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 300;
}

.drop-zone p {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.drop-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* File Panel */
.file-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.file-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border-radius: 0.75rem;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-details h2 {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-clear:hover {
    color: var(--text);
}

/* Actions */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-action {
    flex: 1;
    min-width: 120px;
    padding: 0.875rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-action:hover {
    background: var(--accent-hover);
}

.btn-action.secondary {
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-action.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Progress */
.progress {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 4px;
    background: var(--surface-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Result Panel */
.result-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-header h3 {
    font-size: 1rem;
    font-weight: 500;
}

.result-content {
    background: var(--bg);
    border-radius: 0.5rem;
    padding: 1rem;
    max-height: 300px;
    overflow: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.result-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.8125rem;
}

.result-content.markdown-body {
    background: var(--surface-light);
}

.result-content.markdown-body h1,
.result-content.markdown-body h2,
.result-content.markdown-body h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-content.markdown-body p {
    margin-bottom: 0.75rem;
}

.result-content.markdown-body code {
    background: var(--bg);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
}

.result-content.markdown-body pre code {
    display: block;
    padding: 0.75rem;
    overflow-x: auto;
}

/* Extracted files list */
.file-list {
    list-style: none;
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.file-list li:last-child {
    border-bottom: none;
}

.file-list .file-name {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list .btn-download {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
}

.file-list .btn-download:hover {
    text-decoration: underline;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.result-actions .btn-action {
    flex: 1;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
}

footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 500px) {
    body {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .drop-zone {
        padding: 2rem 1.5rem;
    }

    .actions {
        flex-direction: column;
    }

    .btn-action {
        min-width: 100%;
    }
}
