/* QBee Design Tokens */
:root {
    --color-bg-sidebar: #0f172a;
    --color-bg-main: #0b0f19;
    --color-bg-card: rgba(30, 41, 59, 0.4);
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(99, 102, 241, 0.3);
    
    --color-primary: #6366f1; /* Indigo */
    --color-primary-glow: rgba(99, 102, 241, 0.15);
    --color-teal: #0d9488;
    --color-teal-glow: rgba(13, 148, 136, 0.15);
    --color-amber: #d97706;
    --color-amber-glow: rgba(217, 119, 6, 0.15);
    --color-red: #dc2626;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-main);
    color: #f1f5f9;
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* App Grid Layout */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar navigation */
.app-sidebar {
    background-color: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-honey {
    color: #f59e0b;
    font-size: 1.75rem;
}

.brand-text .dot {
    color: var(--color-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), #4f46e5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-size: 0.95rem;
    font-weight: 600;
}

.status-online {
    font-size: 0.75rem;
    color: var(--color-teal);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-teal);
    border-radius: 50%;
    animation: simplePulse 1.5s infinite;
}

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

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    border-left: 3px solid var(--color-primary);
    background: rgba(99, 102, 241, 0.08);
}

.active-students-list {
    margin-top: auto;
}

.active-students-list h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.active-students-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.active-students-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

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

.status-dot.online { background-color: var(--color-teal); }
.status-dot.away { background-color: #f59e0b; }

/* Main Section */
.app-main {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Header Top */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.session-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.session-label { color: #64748b; }
.session-code {
    font-family: var(--font-mono);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.connection-pill {
    font-size: 0.75rem;
    background: var(--color-teal-glow);
    color: #2dd4bf;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pulse-green {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2dd4bf;
    box-shadow: 0 0 8px #2dd4bf;
}

.score-badge {
    background: var(--color-amber-glow);
    color: #fbbf24;
    border: 1px solid rgba(217, 119, 6, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.score-icon { margin-right: 0.25rem; }

/* Broadcast Notification Banner */
.broadcast-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-amber-glow);
    border: 1px solid rgba(217, 119, 6, 0.4);
    padding: 1rem;
    border-radius: 8px;
    color: #f59e0b;
    font-size: 0.95rem;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.broadcast-banner.hidden { display: none; }

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

/* Quiz Portal Container */
.arena-section {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
}

.arena-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.92);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.arena-overlay.hidden { display: none; }

.overlay-content {
    max-width: 400px;
    padding: 2rem;
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: lockShake 2s infinite ease;
}

@keyframes lockShake {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.overlay-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.overlay-content p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Quiz Card Container */
.arena-card {
    background: var(--color-bg-card);
    padding: 2.5rem;
    backdrop-filter: blur(8px);
}

.arena-card.hidden { display: none; }

.quiz-progress-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-lbl {
    font-size: 0.9rem;
    color: #94a3b8;
}

.progress-lbl strong { color: #ffffff; }

.quiz-timer {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: #fb7185;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #a5b4fc);
    border-radius: 99px;
    transition: width 0.3s ease;
}

.question-container {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: left;
    color: #cbd5e1;
    font-size: 1rem;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border-hover);
    color: #ffffff;
    transform: translateX(3px);
}

.option-btn.selected {
    background: var(--color-primary-glow);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.option-btn.correct {
    background: var(--color-teal-glow);
    border-color: var(--color-teal);
    color: #2dd4bf;
}

.option-btn.incorrect {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--color-red);
    color: #f87171;
}

.option-letter {
    font-family: var(--font-mono);
    color: #64748b;
    margin-right: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.option-btn.selected .option-letter {
    background: var(--color-primary);
    color: #ffffff;
}

.arena-actions {
    display: flex;
    justify-content: space-between;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-primary:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Quiz Finished Card */
.finished-card {
    text-align: center;
    padding: 4rem 2.5rem;
}

.trophy-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.finished-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.finished-card p {
    color: #94a3b8;
    max-width: 450px;
    margin: 0 auto 2.5rem auto;
}

.final-score {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    width: fit-content;
    margin: 0 auto 3rem auto;
    padding: 1.5rem 3rem;
    display: flex;
    flex-direction: column;
}

.final-score .num {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.final-score .lbl {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
}

/* Teacher Remote Control Panel Simulator */
.teacher-simulator-section {
    background: rgba(30, 41, 59, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.simulator-header {
    margin-bottom: 1.5rem;
}

.sim-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.2);
    color: #fb923c;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.simulator-header h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.simulator-header p {
    color: #64748b;
    font-size: 0.85rem;
}

.simulator-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-sim {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: #cbd5e1;
    border-radius: 8px;
}

.btn-sim:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-sim .icon {
    margin-right: 0.25rem;
}

.btn-sim.btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--color-red);
}

/* Info Marketing Section */
.info-section {
    border-top: 1px solid var(--color-border);
    padding-top: 3rem;
    margin-top: 2rem;
}

.container-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.section-lead {
    color: #94a3b8;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.05rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
}

.info-card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.info-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-card p {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .app-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 1.5rem;
    }
    .active-students-list {
        display: none;
    }
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .arena-card {
        padding: 1.5rem;
    }
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .header-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}
