:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --accent: #3b82f6;
    /* Blue for Inspector */
    --accent-hover: #2563eb;
    --success: #22c55e;
    --error: #ef4444;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    color: var(--text-secondary);
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.back-to-home {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: color 0.3s ease;
}

.back-to-home:hover {
    color: var(--accent);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon svg {
    width: 64px;
    height: 64px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* File Info Section */
.file-info {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.file-icon {
    font-size: 2.5rem;
}

.file-meta {
    flex: 1;
}

.file-meta h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-meta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-remove {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-convert {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-convert:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* Result Section */
.result-section {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border);
}

.file-summary {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(59, 130, 246, 0.05);
    /* Light blue bg */
}

.summary-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.summary-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.summary-text strong {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.summary-text span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 600;
    font-size: 1.1rem;
    word-break: break-word;
}

.raw-data {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
}

.raw-data summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 500;
    outline: none;
}

.raw-data pre {
    background: var(--bg);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    color: var(--text);
    font-family: monospace;
    max-height: 300px;
    border: 1px solid var(--border);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    filter: brightness(0.95);
}

.btn-secondary.sm {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-bottom: 2rem;
}