/* ══════════════════════════════════════════════════════
   Quiz Platform — IT Quiz "Забавные факты из мира IT"
   Modern EdTech Design System
   ══════════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────────── */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #06b6d4;
    --secondary-light: #cffafe;
    --accent: #8b5cf6;
    --accent-light: #ede9fe;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;

    --bg: #f0f4f8;
    --bg-card: #ffffff;
    --bg-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #06b6d4 100%);
    --bg-hero-dark: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #0891b2 100%);

    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-on-primary: #ffffff;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.15);

    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-bg: #1e1b4b;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(99,102,241,0.3);
    --sidebar-text: #c7d2fe;
    --sidebar-width: 260px;
}

/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
    cursor: pointer; font-size: 14px; font-weight: 600; font-family: var(--font);
    transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--bg); border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--bg-hero); color: var(--text-on-primary); border: none; }
.btn-primary:hover { opacity: 0.92; box-shadow: var(--shadow-md), var(--shadow-glow); color: white; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white; border: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; font-size: 16px; }
.btn-ghost { background: transparent; border: none; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-light); }

/* ── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input[type="text"], .form-group input[type="email"],
.form-group input[type="password"], .form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group textarea, .form-group select {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: var(--radius); font-size: 15px; font-family: var(--font);
    background: var(--bg-card); color: var(--text); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-card { background: var(--bg-card); padding: 32px 36px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form-row { display: flex; gap: 28px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.checkboxes label { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--text); }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.monospace { font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace; font-size: 13px; }

/* ── Tables ───────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: linear-gradient(to bottom, #f8fafc, #f1f5f9); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-secondary); }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.actions { white-space: nowrap; display: flex; gap: 4px; }
.actions form.inline { display: inline; }
.row-correct { background: var(--success-light) !important; }
.row-wrong { background: var(--danger-light) !important; }
.archived { opacity: 0.45; }

/* ── Badges ───────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; letter-spacing: 0.3px; }
.badge-completed { background: var(--success-light); color: #065f46; }
.badge-in_progress { background: var(--warning-light); color: #92400e; }
.badge-failed { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--primary-light); color: #3730a3; }

/* ── Admin Layout ─────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width); background: var(--sidebar-bg); color: var(--sidebar-text);
    display: flex; flex-direction: column; position: fixed;
    top: 0; left: 0; bottom: 0; z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.sidebar-brand {
    padding: 24px 24px 20px; font-size: 18px; font-weight: 800; color: white;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(139,92,246,0.2));
    letter-spacing: -0.3px;
}
.sidebar-brand span { font-size: 22px; margin-right: 8px; }
.sidebar-nav { list-style: none; padding: 12px 0; flex: 1; overflow-y: auto; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px; color: var(--sidebar-text);
    font-size: 14px; font-weight: 500; transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-nav li a:hover { background: var(--sidebar-hover); color: white; text-decoration: none; border-left-color: var(--primary); }
.sidebar-nav li a .nav-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-footer {
    padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px; background: rgba(0,0,0,0.15);
}
.user-info { display: block; margin-bottom: 10px; color: rgba(255,255,255,0.7); }
.user-role { font-size: 11px; background: var(--sidebar-active); padding: 2px 8px; border-radius: var(--radius-full); color: white; font-weight: 600; margin-left: 6px; }
.admin-main { margin-left: var(--sidebar-width); padding: 32px 40px; flex: 1; width: calc(100% - var(--sidebar-width)); min-height: 100vh; }

/* ── Stats Grid ───────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card); padding: 24px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); text-align: center; position: relative; overflow: hidden;
    transition: var(--transition);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--bg-hero); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-value { font-size: 36px; font-weight: 800; background: var(--bg-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Cards & Misc ─────────────────────────────────────── */
.card { background: var(--bg-card); padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: 24px; font-weight: 800; color: var(--text); }
.filter-bar { margin-bottom: 20px; }
.filter-bar select { padding: 10px 16px; border: 2px solid var(--border); border-radius: var(--radius); font-family: var(--font); font-size: 14px; background: var(--bg-card); cursor: pointer; transition: var(--transition); }
.filter-bar select:focus { border-color: var(--primary); outline: none; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.detail-grid > div { padding: 8px 0; }
.detail-grid strong { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 2px; }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 20px; } .mb-2 { margin-bottom: 20px; }
.import-form { margin-bottom: 20px; display: flex; gap: 10px; align-items: center; }
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500; }
.alert-error { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.export-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.export-bar h2 { margin-right: 8px; font-size: 18px; }

/* ── Chart ────────────────────────────────────────────── */
.chart-container { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding: 10px 0; overflow-x: auto; }
.chart-bar {
    background: var(--bg-hero); min-width: 28px; border-radius: 8px 8px 0 0;
    display: flex; align-items: flex-start; justify-content: center; min-height: 24px;
    transition: var(--transition); cursor: default;
}
.chart-bar:hover { opacity: 0.85; transform: scaleY(1.02); transform-origin: bottom; }
.chart-label { font-size: 10px; color: white; padding-top: 4px; font-weight: 700; }

/* ══════════════════════════════════════════════════════
   PUBLIC PAGES — Quiz Participant Interface
   ══════════════════════════════════════════════════════ */

/* ── Decorative background pattern ────────────────────── */
.public-body {
    background: var(--bg);
    min-height: 100vh;
    position: relative;
}
.public-body::before {
    content: '';
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(99,102,241,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6,182,212,0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139,92,246,0.04) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.public-container { max-width: 960px; margin: 0 auto; padding: 40px 24px; position: relative; z-index: 1; }
.public-container.narrow { max-width: 680px; }

/* ── Hero Section ─────────────────────────────────────── */
.hero {
    background: var(--bg-hero); border-radius: var(--radius-xl);
    padding: 56px 40px; text-align: center; color: white;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99,102,241,0.2);
    margin-bottom: 32px;
}
.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.hero p { font-size: 17px; opacity: 0.9; max-width: 500px; margin: 0 auto 28px; line-height: 1.6; }
.hero .btn { font-size: 17px; padding: 16px 40px; border-radius: var(--radius-lg); background: white; color: var(--primary); font-weight: 700; border: none; box-shadow: var(--shadow-md); }
.hero .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: #f8fafc; }

/* ── Quiz Info Badges ─────────────────────────────────── */
.quiz-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px; margin-bottom: 32px;
}
.info-badge {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    transition: var(--transition);
}
.info-badge:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.info-badge .info-icon { font-size: 24px; margin-bottom: 6px; display: block; }
.info-badge .info-value { font-size: 16px; font-weight: 700; color: var(--text); display: block; }
.info-badge .info-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* ── Quiz Cards (index page) ──────────────────────────── */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.quiz-card {
    background: var(--bg-card); padding: 32px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); text-align: center; transition: var(--transition);
    border: 1px solid var(--border); position: relative; overflow: hidden;
}
.quiz-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--bg-hero);
}
.quiz-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.quiz-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.quiz-card p { color: var(--text-secondary); margin-bottom: 20px; font-size: 14px; line-height: 1.6; }
.quiz-logo { max-width: 100px; margin-bottom: 16px; border-radius: var(--radius); }
.empty-state { text-align: center; color: var(--text-secondary); font-size: 18px; padding: 60px 20px; }

/* ── Login Page ───────────────────────────────────────── */
.login-body {
    background: var(--sidebar-bg); min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.login-body::before {
    content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 30% 70%, rgba(99,102,241,0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(6,182,212,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.login-container { width: 100%; max-width: 420px; padding: 24px; position: relative; z-index: 1; }
.login-card {
    background: var(--bg-card); padding: 40px; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99,102,241,0.1);
}
.login-card h1 { text-align: center; margin-bottom: 8px; font-size: 24px; font-weight: 800; background: var(--bg-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 28px; font-size: 14px; }

/* ── Start Page (participant registration) ────────────── */
.start-card {
    background: var(--bg-card); padding: 40px 48px; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.start-card .form-row { gap: 48px; }
.start-card .form-row .form-group { flex: 1 1 calc(50% - 60px); min-width: 120px; }
.start-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--text); text-align: center; }

/* ── Question Page ────────────────────────────────────── */
.quiz-progress-bar {
    height: 8px; background: rgba(99,102,241,0.12); border-radius: var(--radius-full);
    margin-bottom: 8px; overflow: hidden;
}
.quiz-progress-fill {
    height: 100%; background: var(--bg-hero); border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.question-counter {
    text-align: center; color: var(--text-secondary); margin-bottom: 20px;
    font-size: 14px; font-weight: 600;
}
.question-counter span { color: var(--primary); font-weight: 700; }

.question-card {
    background: var(--bg-card); padding: 36px; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
    animation: fadeInUp 0.4s ease-out;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.question-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); line-height: 1.5; }
.question-hint { font-size: 13px; color: var(--text-light); margin-bottom: 20px; font-weight: 500; }
.question-image { margin-bottom: 20px; text-align: center; }
.question-image img { max-width: 100%; max-height: 320px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ── Answer Options ───────────────────────────────────── */
.answers-list { display: flex; flex-direction: column; gap: 12px; }
.answer-option {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; border: 2px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: var(--transition); position: relative;
    background: var(--bg-card);
}
.answer-option:hover { border-color: var(--primary); background: #fafaff; box-shadow: var(--shadow-sm); transform: translateX(4px); }
.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; width: 22px; height: 22px;
    border: 2px solid var(--border-hover); border-radius: 50%; flex-shrink: 0;
    transition: var(--transition); position: relative; cursor: pointer;
}
.answer-option input[type="checkbox"] { border-radius: 6px; }
.answer-option input:checked {
    border-color: var(--primary); background: var(--primary);
}
.answer-option input:checked::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 8px; height: 8px; background: white; border-radius: 50%;
}
.answer-option input[type="checkbox"]:checked::after {
    content: '✓'; width: auto; height: auto; background: none;
    color: white; font-size: 14px; font-weight: 700;
}
.answer-option:has(input:checked) {
    border-color: var(--primary); background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.answer-content { display: flex; align-items: center; gap: 12px; flex: 1; }
.answer-image { max-width: 80px; max-height: 60px; border-radius: 8px; object-fit: cover; }
.answer-text { font-size: 15px; font-weight: 500; color: var(--text); }
.answer-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.answer-row input[type="text"] { flex: 1; min-width: 200px; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius); font-family: var(--font); font-size: 14px; }
.answer-row input[type="text"]:focus { border-color: var(--primary); outline: none; }

/* ── Result Page ──────────────────────────────────────── */
.result-card {
    background: var(--bg-card); padding: 48px 40px; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); text-align: center; position: relative; overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}
.result-card h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.result-pass { border-top: 5px solid var(--success); }
.result-pass h1 { color: var(--success); }
.result-pass .result-score { background: linear-gradient(135deg, #10b981, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.result-fail { border-top: 5px solid var(--warning); }
.result-fail h1 { color: var(--text); }
.result-fail .result-score { color: var(--text-secondary); }

.result-emoji { font-size: 56px; margin-bottom: 12px; display: block; animation: bounceIn 0.6s ease-out; }
@keyframes bounceIn {
    0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); }
}
.result-score { font-size: 72px; font-weight: 800; margin: 12px 0; letter-spacing: -2px; }
.result-details { display: flex; justify-content: center; gap: 32px; margin: 24px 0; flex-wrap: wrap; }
.result-item { text-align: center; }
.result-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; display: block; margin-bottom: 4px; }
.result-value { font-size: 20px; font-weight: 700; color: var(--text); }
.result-message { color: var(--text-secondary); font-size: 15px; margin-top: 16px; line-height: 1.6; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── Certificate Download Card ────────────────────────── */
.cert-card {
    background: linear-gradient(135deg, #faf5ff, #ede9fe, #e0e7ff);
    border: 2px solid #c4b5fd; border-radius: var(--radius-lg);
    padding: 32px; margin-top: 28px; text-align: center;
    box-shadow: var(--shadow), 0 0 30px rgba(139,92,246,0.1);
}
.cert-card .cert-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.cert-card h3 { font-size: 18px; font-weight: 700; color: #5b21b6; margin-bottom: 8px; }
.cert-card p { font-size: 13px; color: #7c3aed; margin-bottom: 16px; }
.cert-card .btn { background: linear-gradient(135deg, #7c3aed, #6366f1); color: white; border: none; padding: 14px 32px; font-size: 15px; }
.cert-card .btn:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(124,58,237,0.3); }
.cert-number { font-size: 12px; color: var(--text-light); margin-top: 10px; font-family: monospace; }

.finish-text { color: var(--text-secondary); margin-top: 20px; font-size: 14px; }
.welcome-text { color: var(--text-secondary); text-align: center; margin-bottom: 20px; font-size: 15px; line-height: 1.6; }
.image-preview { margin-top: 10px; }
.image-preview img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { width: 220px; }
    .admin-main { margin-left: 220px; padding: 20px; width: calc(100% - 220px); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; gap: 0; }
    .hero { padding: 40px 24px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
    .question-card { padding: 24px; }
    .result-score { font-size: 56px; }
    .result-details { gap: 20px; }
    .quiz-info-grid { grid-template-columns: repeat(2, 1fr); }
    .answer-option { padding: 14px 16px; }
}
@media (max-width: 480px) {
    .public-container { padding: 20px 16px; }
    .hero { padding: 32px 20px; border-radius: var(--radius-lg); }
    .hero h1 { font-size: 22px; }
    .quiz-info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .info-badge { padding: 12px; }
    .result-card { padding: 32px 20px; }
    .cert-card { padding: 24px; }
}

/* ── Utility animations ───────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.animate-pulse { animation: pulse 2s infinite; }
