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

        :root {
            color-scheme: dark;
            --bg: #0f141b;
            --bg-alt: #141c26;
            --surface: #1b2432;
            --surface-strong: #212c3d;
            --surface-soft: rgba(255, 255, 255, 0.035);
            --border: #2a364a;
            --text: #e6edf3;
            --muted: #93a1b1;
            --accent: #4fc3f7;
            --accent-strong: #1fb6ff;
            --success: #4caf50;
            --warning: #ff9800;
            --danger: #f44336;
        }

        body.theme-light {
            color-scheme: light;
            --bg: #f4f6fb;
            --bg-alt: #eef2f7;
            --surface: #ffffff;
            --surface-strong: #f5f7fb;
            --surface-soft: rgba(15, 20, 27, 0.04);
            --border: rgba(15, 20, 27, 0.08);
            --text: #1c2532;
            --muted: #556274;
            --accent: #0d7fd1;
            --accent-strong: #0b6bb0;
        }

        body {
            font-family: "IBM Plex Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            background: radial-gradient(circle at top, #1a2433 0%, #0f141b 65%);
            min-height: 100vh;
            color: var(--text);
        }

        body.theme-light {
            background: radial-gradient(circle at top, #f8faff 0%, #eef2f7 55%);
        }

        /* Navigation */
        .nav {
            background: var(--bg-alt);
            padding: 16px 28px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            flex-wrap: wrap;
            gap: 12px;
        }

        .nav-brand {
            font-size: 1.3rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            color: var(--text);
        }

        .nav-brand-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: auto;
        }

        .nav-toggle {
            display: none;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text);
            border-radius: 10px;
            padding: 6px 10px;
            font-size: 1rem;
            cursor: pointer;
        }

        .nav-links {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            background: rgba(255, 255, 255, 0.04);
            padding: 6px;
            border-radius: 999px;
        }

        .nav-btn {
            background: transparent;
            color: var(--muted);
            border: 1px solid transparent;
            padding: 8px 14px;
            border-radius: 999px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.85rem;
            letter-spacing: 0.02em;
        }

        .nav-btn:hover, .nav-btn.active {
            background: var(--surface);
            color: var(--text);
            border-color: transparent;
        }

        .nav-btn.primary {
            background: var(--accent);
            color: #0f141b;
            font-weight: 600;
            border-color: transparent;
        }

        .nav-btn.ghost {
            border-color: transparent;
            color: var(--text);
        }

        .nav-user {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .theme-toggle {
            background: var(--surface);
            border: none;
            color: var(--text);
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 0.85rem;
            cursor: pointer;
        }

        .nav-user-name {
            font-size: 0.85rem;
            color: var(--muted);
        }

        .app-shell {
            display: block;
        }

        /* Main Container */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            gap: 16px;
            margin-bottom: 16px;
            flex-wrap: wrap;
        }

        .page-title {
            font-size: 1.5rem;
            font-weight: 700;
        }

        .page-subtitle {
            color: var(--muted);
            margin-top: 6px;
            max-width: 700px;
        }

        .notice {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            padding: 12px 14px;
            color: var(--muted);
            font-size: 0.9rem;
        }

        .view {
            display: none;
        }

        .view.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Cards */
        .card {
            background: var(--surface-soft);
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 14px;
            border: none;
            box-shadow: none;
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .card-title {
            font-size: 1.2rem;
            color: var(--text);
        }

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

        /* Dashboard layout */
        .dashboard-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            gap: 20px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }

        .dashboard-title {
            font-size: 1.6rem;
            color: var(--text);
        }

        .dashboard-subtitle {
            color: var(--muted);
            margin-top: 5px;
            max-width: 520px;
        }

        .dashboard-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .dashboard-layout {
            display: grid;
            grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
            gap: 18px;
        }

        .section {
            background: var(--surface-soft);
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 14px;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 14px;
        }

        .section-title {
            font-size: 1.05rem;
            font-weight: 600;
            color: var(--text);
        }

        .section-meta {
            color: var(--muted);
            font-size: 0.9rem;
        }

        .queue-list,
        .mode-list {
            display: grid;
            gap: 10px;
        }

        .queue-row,
        .mode-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            gap: 12px;
            align-items: center;
            padding: 10px 12px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.02);
            border: none;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }

        .queue-row:hover,
        .mode-row:hover {
            background: rgba(255, 255, 255, 0.05);
            transform: translateY(-1px);
        }

        .queue-info,
        .mode-info {
            display: grid;
            gap: 4px;
        }

        .queue-title,
        .mode-title {
            font-weight: 600;
            color: var(--text);
        }

        .queue-meta,
        .mode-meta {
            color: var(--muted);
            font-size: 0.85rem;
        }

        .queue-count,
        .mode-count {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--text);
            min-width: 48px;
            text-align: right;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 0.85rem;
        }

        .stats-inline {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 12px;
        }

        .stat-inline {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 10px;
            padding: 12px 14px;
            border: none;
            display: grid;
            gap: 6px;
        }

        .data-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 10px;
        }

        .info-list {
            margin-top: 10px;
            color: var(--muted);
            font-size: 0.9rem;
            display: grid;
            gap: 6px;
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 10px;
            padding: 14px;
            text-align: center;
            border: none;
        }

        .stat-value {
            font-size: 2.2rem;
            font-weight: 700;
            color: var(--accent);
        }

        .stat-label {
            color: var(--muted);
            margin-top: 5px;
        }

        .stat-card.success .stat-value { color: #4caf50; }
        .stat-card.warning .stat-value { color: #ff9800; }
        .stat-card.danger .stat-value { color: #f44336; }
        .stat-card.info .stat-value { color: #2196f3; }

        /* Difficulty Badges */
        .difficulty {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: bold;
            text-transform: uppercase;
        }

        .difficulty.leicht { background: #4caf50; color: white; }
        .difficulty.mittel { background: #ff9800; color: white; }
        .difficulty.schwer { background: #f44336; color: white; }

        /* SRS Status */
        .srs-status {
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 0.7rem;
            font-weight: bold;
        }

        .srs-status.new { background: #9c27b0; color: white; }
        .srs-status.learning { background: #2196f3; color: white; }
        .srs-status.review { background: #4caf50; color: white; }
        .srs-status.due { background: #f44336; color: white; }

        /* Questions Table */
        .questions-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }

        .questions-table th,
        .questions-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .questions-table th {
            background: transparent;
            color: var(--accent);
            font-weight: 600;
        }

        .questions-table tr:hover {
            background: rgba(255, 255, 255, 0.03);
        }

        .questions-table .actions {
            display: flex;
            gap: 8px;
        }

        .btn-icon {
            background: #3d4a5c;
            border: none;
            color: #e0e0e0;
            width: 32px;
            height: 32px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .btn-icon:hover { background: #4fc3f7; color: #1a1a2e; }
        .btn-icon.delete:hover { background: #f44336; color: white; }

        /* Buttons */
        .btn {
            background: var(--accent);
            color: #0f141b;
            border: none;
            padding: 12px 30px;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(79, 195, 247, 0.4);
        }

        .btn:disabled {
            background: #3d4a5c;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .btn-secondary {
            background: var(--surface-strong);
            color: var(--text);
        }

        .btn-secondary:hover {
            background: #2f3c52;
            box-shadow: none;
        }

        .btn-success { background: linear-gradient(135deg, #4caf50, #2e7d32); }
        .btn-danger { background: linear-gradient(135deg, #f44336, #c62828); }

        /* Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 20px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal {
            background: #1e2a3a;
            border-radius: 15px;
            padding: 30px;
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .modal-title {
            font-size: 1.5rem;
            color: #4fc3f7;
        }

        .modal-close {
            background: none;
            border: none;
            color: #90a4ae;
            font-size: 1.5rem;
            cursor: pointer;
        }

        .modal-close:hover { color: #f44336; }

        /* Form */
        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            color: #90a4ae;
            font-weight: 500;
        }

        .form-input,
        .form-textarea,
        .form-select {
            width: 100%;
            padding: 12px;
            background: var(--surface-strong);
            border: 2px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            font-size: 1rem;
        }

        .type-help {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            padding: 12px 14px;
            font-size: 0.9rem;
            color: var(--muted);
        }

        .cloze-builder {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 12px;
            padding: 12px 14px;
            display: grid;
            gap: 10px;
        }

        .cloze-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .cloze-preview {
            background: rgba(0, 0, 0, 0.15);
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 0.95rem;
            line-height: 1.4;
            color: var(--text);
        }

        .cloze-blank {
            display: inline-block;
            min-width: 64px;
            padding: 2px 6px;
            margin: 0 2px;
            border-radius: 6px;
            background: rgba(79, 195, 247, 0.2);
            color: var(--accent);
            font-weight: 600;
        }

        .form-input:focus,
        .form-textarea:focus,
        .form-select:focus {
            outline: none;
            border-color: var(--accent);
        }

        .nav-btn:focus-visible,
        .settings-btn:focus-visible,
        .btn:focus-visible,
        .btn-secondary:focus-visible,
        .filter-btn:focus-visible,
        .btn-icon:focus-visible,
        .form-input:focus-visible,
        .form-textarea:focus-visible,
        .form-select:focus-visible,
        .mode-card:focus-visible,
        .mode-row:focus-visible,
        .queue-row:focus-visible,
        .auth-tab:focus-visible {
            outline: 3px solid #4fc3f7;
            outline-offset: 2px;
        }

        .form-textarea {
            min-height: 100px;
            resize: vertical;
        }

        .options-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .option-row {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .option-row input[type="text"] {
            flex: 1;
        }

        .option-row input[type="radio"],
        .option-row input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: #4fc3f7;
        }

        /* Quiz View */
        .quiz-container {
            max-width: 800px;
            margin: 0 auto;
        }

        .progress-bar {
            background: #2d3748;
            border-radius: 10px;
            height: 20px;
            margin-bottom: 20px;
            overflow: hidden;
        }

        .progress-fill {
            background: linear-gradient(90deg, #4fc3f7, #00e676);
            height: 100%;
            width: 0%;
            transition: width 0.5s ease;
            border-radius: 10px;
        }

        .question-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .question-card {
            background: rgba(255, 255, 255, 0.035);
            border-radius: 14px;
            padding: 22px;
            margin-bottom: 16px;
            border: none;
        }

        .question-type {
            background: #4fc3f7;
            color: #1a1a2e;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: bold;
            display: inline-block;
            margin-right: 10px;
        }

        .question-text {
            font-size: 1.3rem;
            margin: 20px 0;
            line-height: 1.5;
        }

        .scenario-box {
            background: #2d3748;
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
            border-left: 4px solid #4fc3f7;
            font-style: italic;
        }

        .options {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .option {
            background: #2d3748;
            border: 2px solid #3d4a5c;
            border-radius: 10px;
            padding: 15px 20px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .option:hover:not(.disabled) {
            background: #3d4a5c;
            border-color: #4fc3f7;
        }

        .option.selected { background: #2a4a6a; border-color: #4fc3f7; }
        .option.correct { background: #1b5e20; border-color: #4caf50; }
        .option.incorrect { background: #b71c1c; border-color: #f44336; }
        .option.show-correct { background: #1b5e20; border-color: #4caf50; }
        .option.disabled { cursor: default; }

        .option.multi-select { position: relative; padding-left: 45px; }
        .option.multi-select::before {
            content: '';
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            border: 2px solid #4fc3f7;
            border-radius: 4px;
            background: transparent;
        }
        .option.multi-select.selected::before {
            background: #4fc3f7;
        }
        .option.multi-select.selected::after {
            content: '✓';
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: #1a1a2e;
            font-weight: bold;
        }

        .multi-select-hint {
            background: #9c27b0;
            color: white;
            padding: 8px 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            font-size: 0.9rem;
        }

        .submit-multi-btn {
            margin-top: 15px;
            width: 100%;
        }

        .cloze-input {
            background: #2d3748;
            border: 2px solid #4fc3f7;
            border-radius: 8px;
            padding: 10px 15px;
            color: #e0e0e0;
            font-size: 1.1rem;
            width: 100%;
            max-width: 300px;
            margin: 10px 0;
        }

        .cloze-input:focus {
            outline: none;
            border-color: #00e676;
        }

        .cloze-hint {
            color: #90a4ae;
            font-size: 0.9rem;
            margin-top: 5px;
        }

        /* Open Questions */
        .open-answer-area {
            width: 100%;
            min-height: 150px;
            padding: 15px;
            background: #2d3748;
            border: 2px solid #3d4a5c;
            border-radius: 10px;
            color: #e0e0e0;
            font-size: 1rem;
            font-family: inherit;
            resize: vertical;
            margin-bottom: 15px;
        }

        .open-answer-area:focus {
            outline: none;
            border-color: #4fc3f7;
        }

        .open-answer-area:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        .ai-feedback {
            background: #2d3748;
            border-radius: 10px;
            padding: 20px;
            margin-top: 15px;
        }

        .ai-feedback-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }

        .ai-feedback-icon {
            font-size: 1.5rem;
        }

        .ai-feedback-result {
            font-weight: bold;
            font-size: 1.1rem;
        }

        .ai-feedback-result.pass { color: #4caf50; }
        .ai-feedback-result.partial { color: #ff9800; }
        .ai-feedback-result.fail { color: #f44336; }

        .ai-feedback-content {
            line-height: 1.6;
        }

        .ai-feedback-section {
            margin-bottom: 10px;
        }

        .ai-feedback-section strong {
            color: #4fc3f7;
        }

        .model-answer-btn {
            margin-top: 15px;
        }

        .model-answer {
            background: #1b5e20;
            border: 1px solid #4caf50;
            border-radius: 10px;
            padding: 15px;
            margin-top: 15px;
        }

        .model-answer-title {
            color: #4caf50;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #3d4a5c;
            border-top-color: #4fc3f7;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 10px;
        }

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

        .submitting-text {
            color: #90a4ae;
            display: flex;
            align-items: center;
            margin-top: 10px;
        }

        /* Settings */
        .settings-btn {
            background: none;
            border: none;
            color: var(--muted);
            font-size: 1.3rem;
            cursor: pointer;
            padding: 5px 10px;
            transition: color 0.2s;
        }

        .settings-btn:hover {
            color: var(--accent);
        }

        .api-key-input {
            font-family: monospace;
        }

        .api-status {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 10px;
            font-size: 0.9rem;
        }

        .api-status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .api-status-dot.connected { background: #4caf50; }
        .api-status-dot.disconnected { background: #f44336; }

        .feedback {
            margin-top: 20px;
            padding: 15px;
            border-radius: 10px;
            display: none;
        }

        .feedback.show { display: block; }
        .feedback.correct { background: rgba(76, 175, 80, 0.2); border: 1px solid #4caf50; }
        .feedback.incorrect { background: rgba(244, 67, 54, 0.2); border: 1px solid #f44336; }

        .srs-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .srs-btn {
            flex: 1;
            min-width: 100px;
            padding: 15px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.2s;
        }

        .srs-btn.again { background: #f44336; color: white; }
        .srs-btn.hard { background: #ff9800; color: white; }
        .srs-btn.good { background: #4caf50; color: white; }
        .srs-btn.easy { background: #2196f3; color: white; }

        .srs-btn:hover { transform: translateY(-2px); }

        .srs-btn small {
            display: block;
            font-weight: normal;
            margin-top: 5px;
            opacity: 0.9;
        }

        /* Results */
        .results-card {
            text-align: center;
            padding: 40px;
            background: var(--surface);
        }

        .score {
            font-size: 4rem;
            font-weight: bold;
            color: #4fc3f7;
            margin: 20px 0;
        }

        .grade {
            font-size: 1.5rem;
            margin: 20px 0;
            padding: 20px;
            border-radius: 15px;
        }

        .grade.excellent { background: linear-gradient(135deg, #4caf50, #2e7d32); }
        .grade.good { background: linear-gradient(135deg, #8bc34a, #558b2f); }
        .grade.ok { background: linear-gradient(135deg, #ffc107, #ff8f00); }
        .grade.needs-work { background: linear-gradient(135deg, #ff5722, #d84315); }

        /* Wrong Questions */
        .wrong-list {
            text-align: left;
            margin-top: 30px;
        }

        .wrong-item {
            background: #2d3748;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 10px;
            border-left: 4px solid #f44336;
        }

        .wrong-item .question { font-weight: bold; margin-bottom: 10px; }
        .wrong-item .answer { color: #90a4ae; font-size: 0.9rem; }
        .wrong-item .correct-answer { color: #4caf50; }

        /* File Input */
        .file-input-wrapper {
            position: relative;
            display: inline-block;
        }

        .file-input-wrapper input[type="file"] {
            position: absolute;
            left: 0;
            top: 0;
            opacity: 0;
            cursor: pointer;
            width: 100%;
            height: 100%;
        }

        /* Charts */
        .chart-container {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 16px;
            border: none;
        }

        .bar-chart {
            display: flex;
            align-items: flex-end;
            height: 200px;
            gap: 10px;
            padding: 20px 0;
        }

        .bar-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .bar {
            width: 100%;
            max-width: 60px;
            background: var(--accent);
            border-radius: 5px 5px 0 0;
            transition: height 0.5s ease;
        }

        .bar-label {
            margin-top: 10px;
            font-size: 0.8rem;
            color: var(--muted);
            text-align: center;
        }

        /* History Table */
        .history-table {
            width: 100%;
            border-collapse: collapse;
        }

        .history-table th,
        .history-table td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .history-table th {
            color: var(--accent);
        }

        .admin-table {
            width: 100%;
            border-collapse: collapse;
        }

        .admin-table th,
        .admin-table td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .admin-table th {
            color: var(--accent);
            font-weight: 600;
        }

        .admin-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .theme-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .theme-chip {
            border: none;
            background: rgba(255, 255, 255, 0.05);
            color: var(--muted);
            padding: 6px 12px;
            border-radius: 999px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .theme-chip.active {
            background: var(--accent);
            color: #0f141b;
        }

        .generate-block {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 12px;
            padding: 14px;
            display: grid;
            gap: 12px;
        }

        .generate-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 10px;
        }

        .slider-row {
            display: grid;
            gap: 6px;
            padding: 10px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
        }

        .slider-row input[type="range"] {
            width: 100%;
        }

        .draft-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 10px;
        }

        .generated-list {
            display: grid;
            gap: 10px;
            margin-top: 10px;
        }

        .generated-item {
            display: grid;
            gap: 6px;
            padding: 10px 12px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
        }

        .generated-meta {
            color: var(--muted);
            font-size: 0.85rem;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .questions-table {
                font-size: 0.85rem;
            }

            .questions-table th:nth-child(3),
            .questions-table td:nth-child(3) {
                display: none;
            }

            .questions-table th:nth-child(4),
            .questions-table td:nth-child(4) {
                display: none;
            }

            .nav {
                flex-direction: column;
                align-items: stretch;
            }

            .nav-brand-row {
                width: 100%;
            }

            .nav-toggle {
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            .nav-links {
                justify-content: center;
                flex-wrap: wrap;
                gap: 6px;
                display: none;
                flex-direction: column;
                align-items: stretch;
                border-radius: 14px;
            }

            .nav-user {
                justify-content: center;
                display: none;
            }

            .nav-btn {
                padding: 8px 10px;
                font-size: 0.9rem;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .card-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .generate-grid {
                grid-template-columns: 1fr;
            }

            .theme-filter {
                flex-wrap: wrap;
            }

            .modal {
                max-height: 85vh;
                overflow-y: auto;
            }

            .nav.nav-open .nav-links,
            .nav.nav-open .nav-user {
                display: flex;
            }
        }

        @media (max-width: 980px) {
            .dashboard-layout {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 640px) {
            .nav-links {
                justify-content: flex-start;
            }

            .nav-btn {
                flex: 1 1 auto;
                text-align: center;
            }

            .questions-table th:nth-child(2),
            .questions-table td:nth-child(2) {
                display: none;
            }

            .queue-row,
            .mode-row {
                grid-template-columns: 1fr;
                justify-items: start;
            }

            .queue-count,
            .mode-count {
                text-align: left;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* Tooltip */
        .tooltip {
            position: relative;
        }

        .tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: #1a1a2e;
            color: #e0e0e0;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.8rem;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
        }

        .tooltip:hover::after {
            opacity: 1;
        }

        /* Quiz Mode Selection */
        .mode-row select {
            max-width: 220px;
        }

        /* Filter buttons */
        .filter-btns {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .filter-btn {
            background: var(--surface-strong);
            border: none;
            color: var(--muted);
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-btn:hover, .filter-btn.active {
            background: var(--accent);
            color: #0f141b;
        }

        /* Empty state */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--muted);
        }

        /* Auth screen */
        .auth-screen {
            min-height: 100vh;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
        }

        .auth-screen.active {
            display: flex;
        }

        .auth-card {
            width: 100%;
            max-width: 420px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 28px;
        }

        .auth-header {
            display: grid;
            gap: 8px;
            margin-bottom: 18px;
        }

        .auth-header h1 {
            font-size: 1.6rem;
        }

        .auth-header p {
            color: var(--muted);
        }

        .auth-tabs {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 18px;
        }

        .auth-tab {
            background: var(--surface-strong);
            border: 1px solid transparent;
            padding: 10px;
            border-radius: 10px;
            cursor: pointer;
            color: var(--muted);
            font-weight: 600;
        }

        .auth-tab.active {
            color: var(--text);
            border-color: var(--accent);
        }

        .auth-error {
            color: var(--danger);
            margin-top: 10px;
            min-height: 20px;
            font-size: 0.9rem;
        }

        .auth-hint {
            color: var(--muted);
            font-size: 0.85rem;
        }

        .hidden {
            display: none !important;
        }

        .empty-state svg {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
            opacity: 0.5;
        }
