/* EnglishExam.eu - Custom Styles */

:root {
    --primary-color: #0066cc;
    --secondary-color: #28a745;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%);
    min-height: 80vh;
}

.hero-section.hero-compact {
    min-height: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%);
}

.min-vh-75 {
    min-height: 75vh;
}

/* Cards */
.exam-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.dashboard-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%);
    color: white;
    border-radius: 15px;
}

/* Avatar */
.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004499 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #004499 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Skill Icons */
.skill-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
}

.skill-reading {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

.skill-listening {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.skill-writing {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.skill-speaking {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Exam level badges */
.exam-level-badge {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
}

/* Feature cards */
.feature-card {
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.writing-highlight-wrapper {
    border: 1px solid #ffe8a1;
    border-radius: 12px;
    padding: 1rem;
    background-color: #fffbe6;
}

.writing-highlight-surface {
    max-height: 280px;
    overflow: auto;
    font-family: 'Inter', monospace;
    white-space: pre-wrap;
    line-height: 1.5;
}

.writing-highlight {
    background-color: rgba(255, 193, 7, 0.35);
    border-bottom: 2px dashed #f0ad4e;
    cursor: pointer;
    padding: 0 2px;
}

.writing-highlight:hover {
    background-color: rgba(255, 193, 7, 0.6);
}

.writing-task-progress {
    height: 6px;
    border-radius: 999px;
}

/* Classroom games page */
.classroom-games-page {
    background: linear-gradient(180deg, #f3f5ff 0%, #f8f9fc 60%, #eef2ff 100%);
    min-height: 100vh;
    padding: 3rem 0 4rem;
}

.classroom-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.classroom-hero {
    background: linear-gradient(120deg, #3c67ff 0%, #7b5bff 40%, #23c9d3 100%);
    color: #fff;
    border-radius: 32px;
    padding: 2.5rem 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 25px 95px rgba(12, 24, 68, 0.35);
}

.classroom-hero .hero-copy {
    flex: 1 1 420px;
    max-width: 640px;
}

.classroom-hero .hero-copy h1 {
    font-size: clamp(2rem, 3vw, 3.4rem);
    margin-bottom: 1rem;
}

.classroom-hero .hero-copy p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
}

.classroom-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.classroom-hero .hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.classroom-hero .level-selector {
    margin-top: 1.75rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.level-selector-heading {
    display: flex;
    gap: 1.75rem;
    justify-content: space-between;
    align-items: flex-start;
}

.level-selector-heading .label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
}

.level-selector-note {
    margin: 0;
    font-size: 0.95rem;
    max-width: 280px;
    color: rgba(255, 255, 255, 0.78);
}

.level-current {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.level-pill {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.level-description {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.level-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.level-chip {
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 1rem;
    background: transparent;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.level-chip:hover,
.level-chip:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.level-chip.is-active {
    background: #fff;
    color: #1c1d42;
    border-color: #fff;
    box-shadow: 0 8px 24px rgba(18, 18, 40, 0.35);
}

.classroom-hero .hero-data {
    flex: 1 1 260px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.classroom-hero .hero-data div {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.classroom-hero .hero-data span {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
}

.classroom-hero .hero-data strong {
    font-size: 1.6rem;
}

.games-showcase {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.games-section {
    background: #f9fafb;
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.9rem;
}

.section-heading p {
    margin-bottom: 0.4rem;
    color: #475569;
}

.section-chip {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
    font-weight: 600;
    font-size: 0.9rem;
}

.games-grid {
    margin-top: 1.5rem;
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.games-grid-featured {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.games-grid-extended {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.game-panel {
    background: #fff;
    border-radius: 28px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
}

.game-panel header {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.game-panel .tile-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.game-panel .tile-title span {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gradient-pink { background: linear-gradient(135deg, #ff5f8d, #ffc371); }
.gradient-gold { background: linear-gradient(135deg, #f5d020, #f53803); }
.gradient-cyan { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.gradient-purple { background: linear-gradient(135deg, #b224ef, #7579ff); }
.gradient-lime { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.gradient-blue { background: linear-gradient(135deg, #17ead9, #6078ea); }
.gradient-orange { background: linear-gradient(135deg, #ff8b5f, #ff3d7f); }
.gradient-sunset { background: linear-gradient(135deg, #fdc830, #f37335); }
.gradient-coral { background: linear-gradient(135deg, #ff6cab, #7366ff); }
.gradient-teal { background: linear-gradient(135deg, #00c6ff, #0072ff); }
.gradient-indigo { background: linear-gradient(135deg, #4c1d95, #6366f1); }
.gradient-rose { background: linear-gradient(135deg, #ff758c, #ff7eb3); }
.gradient-sky { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.gradient-navy { background: linear-gradient(135deg, #172554, #2563eb); }
.gradient-emerald { background: linear-gradient(135deg, #047857, #10b981); }
.gradient-violet { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.game-panel header .icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.game-panel header h3 {
    margin: 0;
    font-size: 1.45rem;
}

.game-panel .panel-details {
    display: none;
    margin-top: 1.25rem;
}

.game-panel .panel-description {
    font-size: 1rem;
    color: #475569;
    margin-bottom: 1rem;
}

.game-panel.is-fullscreen .panel-details {
    display: block;
}

.game-panel .ghost {
    margin-left: auto;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #111827;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.game-panel .ghost:hover {
    background: rgba(15, 23, 42, 0.12);
}

.game-panel.is-fullscreen {
    position: fixed;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, calc(100vw - 2rem));
    height: calc(100vh - 5rem);
    z-index: 960;
    overflow-y: auto;
    box-shadow: 0 60px 140px rgba(8, 11, 40, 0.55);
    padding: 2.25rem;
}

.game-panel.is-fullscreen header {
    margin-bottom: 1rem;
}

.game-panel.focused {
    grid-column: span 2;
    transform: scale(1.02);
    box-shadow: 0 40px 90px rgba(15, 23, 42, 0.2);
}

.game-panel .panel-body {
    min-height: 160px;
}

.game-panel--mini {
    padding: 1.5rem;
}

.game-panel--mini .panel-body {
    min-height: auto;
}

.panel-body.stacked {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.token-pill {
    display: inline-flex;
    align-items: center;
    background: #e0f2fe;
    color: #0f172a;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
}

.prompt-card {
    background: #fff;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.prompt-meta {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-grid span {
    background: #eef2ff;
    color: #4338ca;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.word-chain-starter,
.word-chain-rule,
.sentence-race-note {
    font-weight: 600;
    color: #475569;
    margin: 0;
}

.mega-letter {
    font-size: clamp(3rem, 8vw, 5.2rem);
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #4338ca;
    margin-bottom: 1rem;
}

.mega-letter.pop {
    animation: popLetter 0.5s ease;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.category-tags span {
    background: #f3f4ff;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

.bee-word {
    font-size: 2.4rem;
    font-weight: 700;
    text-transform: lowercase;
}

.bee-hint {
    color: #6b7280;
    margin: 0.35rem 0 0.75rem;
}

.bee-progress {
    height: 6px;
    border-radius: 999px;
    background: #ede9fe;
}

.bee-progress .progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #f472b6);
    width: 0%;
    transition: width 0.45s ease;
}

.flashcard-stack {
    position: relative;
    min-height: 180px;
    perspective: 1200px;
}

.flashcard-stack .face {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 1.5rem;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    backface-visibility: hidden;
    transition: transform 0.65s ease;
}

.flashcard-stack .face.back {
    background: #dbeafe;
    transform: rotateY(180deg);
}

#flashcard-card[data-flipped="true"] .front {
    transform: rotateY(180deg);
}

#flashcard-card[data-flipped="true"] .back {
    transform: rotateY(0deg);
}

.game-panel footer.split {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
}

.hangman-word {
    font-size: 2.6rem;
    text-align: center;
    letter-spacing: 0.18em;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hangman-dots {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.hangman-dots span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hangman-dots span.active {
    background: #8b5cf6;
    transform: scale(1.25);
}

.mission-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    color: #6b7280;
}

.mission-action {
    font-size: 1.4rem;
    font-weight: 700;
    color: #065f46;
}

.mission-frame {
    font-weight: 600;
    color: #047857;
}

.mission-timer {
    margin-top: 1rem;
    font-size: 2.6rem;
    font-weight: 700;
    color: #10b981;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quiz-options button {
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    padding: 0.85rem 1rem;
    text-align: left;
    background: #fff;
    transition: all 0.25s ease;
    font-weight: 600;
}

.quiz-options button:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.quiz-options button.correct {
    border-color: #16a34a;
    background: #ecfdf5;
    color: #166534;
}

.quiz-options button.incorrect {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.quiz-status {
    color: #6b7280;
    font-weight: 500;
}

.emoji-stack {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: 1rem;
}

.emoji-clue {
    text-align: center;
    color: #475569;
    font-weight: 500;
}

.grammar-bad {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
}

.grammar-good {
    font-size: 1.05rem;
    color: #059669;
    font-weight: 600;
}

.grammar-tip {
    font-size: 0.95rem;
    color: #4b5563;
    margin-top: 0.5rem;
}

.team-board {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: none;
}

.game-panel.is-fullscreen .team-board {
    display: block;
}

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

.team-board-label {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #94a3b8;
}

.team-board h4 {
    margin: 0.25rem 0 0;
    font-size: 1.15rem;
}

.team-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 1200px) {
    .team-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .team-list {
        grid-template-columns: 1fr;
    }
}

.team-score-card {
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 140px;
}

.team-card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.team-card-chip {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.team-card-meta strong {
    display: block;
    color: #0f172a;
}

.team-member-count {
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.team-card-points {
    margin-left: auto;
    font-weight: 600;
    color: #0f172a;
}

.team-card-members {
    font-size: 0.85rem;
    color: #475569;
    min-height: 1.3rem;
}

.team-card-controls {
    display: flex;
    gap: 0.4rem;
}

.team-card-controls button {
    flex: 1;
    min-width: 0;
}

.team-card {
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.team-card.team-card-selected {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.4), 0 10px 30px rgba(13, 110, 253, 0.2);
    transform: translateY(-2px);
}

.team-card.team-card-selected::after {
    content: '\2713';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.selected-team-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    margin-bottom: 0.75rem;
}

.selected-team-pill:last-child {
    margin-bottom: 0;
}

.selected-team-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.selected-team-pill small {
    display: block;
    color: #6b7280;
    margin-top: 0.1rem;
}

.team-add {
    display: flex;
    gap: 0.75rem;
}

.team-add .form-control {
    flex: 1;
}

.story-tag-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.story-tag {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.story-tag span {
    display: block;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.story-tag strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.05rem;
    color: #1e293b;
}

.debate-topic {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
}

.debate-topic.quickfire {
    color: #b45309;
}

.debate-sides {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.debate-sides div {
    background: #f1f5f9;
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.debate-sides span {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #94a3b8;
}

.debate-sides strong {
    display: block;
    margin-top: 0.25rem;
    font-weight: 600;
}

.fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 38, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 950;
}

.fullscreen-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.games-overlay-open {
    overflow: hidden;
}

/* Students page */
.students-page {
    background: #f5f7fb;
    min-height: 100vh;
    padding: 3rem 0 4rem;
}

.students-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.students-hero-card {
    background: linear-gradient(120deg, #1e3a8a, #2563eb, #3b82f6);
    border-radius: 28px;
    padding: 2.75rem;
    color: #fff;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
    box-shadow: 0 35px 90px rgba(30, 58, 138, 0.35);
    margin-bottom: 2rem;
}

.students-hero-left h1 {
    font-size: clamp(2rem, 3vw, 2.8rem);
    margin-bottom: 0.75rem;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.4rem;
}

.students-hero-metrics {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.students-hero-metrics span {
    display: block;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
}

.students-hero-metrics strong {
    font-size: 1.6rem;
    font-weight: 700;
}

.students-hero-actions .btn {
    border-radius: 1rem;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 0.75rem 1.5rem;
}

.students-card {
    background: #fff;
    border-radius: 22px;
    padding: 2rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    margin-bottom: 2rem;
}

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

.students-card-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.students-card-header p {
    margin: 0;
    color: #6b7280;
}

.filter-card form .btn {
    min-width: 115px;
}

.students-table-wrapper table thead {
    background: #f8fafc;
}

.students-table-wrapper table thead th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: none;
}

.students-table-wrapper table tbody td {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.student-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.students-pagination {
    margin-top: 2rem;
}

.students-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8fafc;
    border-radius: 20px;
}

.students-empty-state h5 {
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.students-empty-state p {
    color: #64748b;
    margin: 0;
}

@media (max-width: 992px) {
    .students-hero-card {
        flex-direction: column;
    }

    .students-hero-actions {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .students-hero-metrics {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 576px) {
    .students-card {
        padding: 1.5rem;
    }

    .students-hero-card {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .game-panel.focused {
        grid-column: span 1;
    }
    .games-grid,
    .games-grid-featured,
    .games-grid-extended {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    .team-add {
        flex-direction: column;
    }
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-chip {
        align-self: flex-start;
    }
    .games-section {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .classroom-hero {
        padding: 2rem;
    }

    .classroom-hero .hero-cta {
        flex-direction: column;
    }

    .level-selector-heading {
        flex-direction: column;
    }

    .level-selector-note {
        max-width: none;
    }

    .level-current {
        flex-direction: column;
        align-items: flex-start;
    }
    .games-grid,
    .games-grid-featured,
    .games-grid-extended {
        grid-template-columns: minmax(0, 1fr);
    }
    .games-section {
        padding: 1.5rem;
    }
}

@keyframes popLetter {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes floatOrb {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Game Instructions & Timer Controls */
.game-instructions {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0284c7;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.game-instructions p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #0f172a;
}

.game-instructions strong {
    color: #0369a1;
    font-weight: 600;
}

.timer-controls {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.timer-display {
    text-align: center;
    margin-bottom: 0.75rem;
}

.timer-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    letter-spacing: 0.05em;
}

.timer-warning .timer-value {
    color: #dc2626;
    animation: pulse 1s ease-in-out infinite;
}

.timer-finished .timer-value {
    color: #059669;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-buttons .btn-sm {
    min-width: 70px;
    font-size: 0.8rem;
}

.timer-buttons .form-select-sm {
    font-size: 0.8rem;
}

/* Mini game panels - compact timer */
.game-panel--mini .timer-buttons {
    gap: 0.35rem;
}

.game-panel--mini .timer-buttons .btn-sm {
    min-width: 40px;
    padding: 0.25rem 0.5rem;
}

.game-panel--mini .timer-buttons .btn-sm i {
    margin: 0;
}

.game-panel--mini .timer-value {
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .exam-card {
        margin-bottom: 1rem;
    }
    
    .skill-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .timer-value {
        font-size: 2rem;
    }
    
    .timer-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .timer-buttons .btn-sm,
    .timer-buttons .form-select-sm {
        width: 100%;
    }
}
/* Multiplayer Buzzer Game Styles */
.buzzer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.buzzer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.buzzer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.buzzer-btn:active:not(:disabled) {
    transform: scale(0.95);
}

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

.buzzer-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.buzz-order-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.buzz-order-list h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #495057;
}

.buzz-order-list ol {
    margin: 0;
    padding-left: 1.5rem;
}

.buzz-order-list li {
    padding: 0.5rem 0;
    font-weight: 500;
}

/* Live Trivia Game Styles */
.trivia-question-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.trivia-progress {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 500;
}

.trivia-question-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.trivia-answers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.trivia-answer {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.trivia-answer:hover {
    background: #e9ecef;
    border-color: #0066cc;
}

.trivia-answer.correct {
    background: #d4edda;
    border-color: #28a745;
}

.trivia-answer.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    font-weight: 700;
    color: #495057;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.trivia-answer.correct .answer-letter {
    background: #28a745;
    color: white;
}

.trivia-answer.incorrect .answer-letter {
    background: #dc3545;
    color: white;
}

.answer-text {
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
}

.trivia-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Jeopardy Game Styles */
.jeopardy-board {
    background: #1a1a2e;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.jeopardy-categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.jeopardy-category {
    background: #16213e;
    color: #ffffff;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jeopardy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.jeopardy-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border: none;
    color: #f5b942;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.jeopardy-cell:hover:not(:disabled) {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    transform: scale(1.05);
}

.jeopardy-cell:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #0a1929;
}

.jeopardy-clue-display {
    background: #16213e;
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: 1rem;
    color: white;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.jeopardy-clue-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f5b942;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
}

.jeopardy-clue-text {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jeopardy-answer-text {
    font-size: 1.4rem;
    padding: 1.5rem;
    background: rgba(245, 185, 66, 0.15);
    border: 2px solid #f5b942;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}
    text-align: center;
}

.jeopardy-clue-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.jeopardy-clue-actions .btn {
    min-width: 120px;
}

/* Responsive additions for new games */
@media (max-width: 768px) {
    .buzzer-grid {
        grid-template-columns: 1fr;
    }

    .jeopardy-categories,
    .jeopardy-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .jeopardy-cell {
        font-size: 1.2rem;
    }

    .trivia-question-text {
        font-size: 1.1rem;
    }
}
