/* MCQ PDF to PowerPoint Converter - Styles */
/* Clean, modern, responsive, no Bootstrap */

:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
}

.logo-icon {
    font-size: 1.4rem;
}

.main-nav {
    display: flex;
    gap: 1.25rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Main */
.main-content {
    flex: 1;
    padding: 2rem 0 3rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #047857;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Upload box */
.upload-section {
    max-width: 640px;
    margin: 0 auto;
}

.upload-box {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    cursor: pointer;
    position: relative;
}

.upload-box:hover,
.upload-box.dragover {
    border-color: var(--primary);
    background: #f0f7ff;
    box-shadow: var(--shadow-lg);
}

.upload-box.has-file {
    border-style: solid;
    border-color: var(--success);
    background: #f0fdf4;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.upload-or {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.75rem 0;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.choose-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.choose-btn:hover {
    background: var(--primary-dark);
}

.file-limit {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.selected-file {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--success);
    font-weight: 600;
    word-break: break-all;
}

/* Limitation notice */
.limitation-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 2rem auto;
    max-width: 640px;
}

.limitation-box h3 {
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.limitation-box ul {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
    color: #78350f;
}

.limitation-box li {
    padding: 0.2rem 0;
}

.limitation-box li::before {
    content: "• ";
}

.supported {
    color: var(--success);
    font-weight: 600;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Preview */
.preview-section {
    margin-top: 2rem;
}

.preview-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.question-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.question-card .q-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.question-card .q-text {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

.option-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.option-list li {
    background: #f1f5f9;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
}

/* Processing UI */
.processing-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    margin: 2rem auto;
}

.processing-box h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.stage-list {
    list-style: none;
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}

.stage-list li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stage-list li.done {
    color: var(--success);
}

.stage-list li.active {
    color: var(--primary);
    font-weight: 600;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Download success */
.success-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    margin: 2rem auto;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.success-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--success);
}

.success-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Features section on homepage */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.feature-card .icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Mobile */
@media (max-width: 600px) {
    .option-list {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 1.5rem 0 1rem;
    }

    .upload-box {
        padding: 1.75rem 1rem;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-lg {
        width: 100%;
    }
}
