/* Existing styles */
.student-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
    z-index: var(--z-modal);
    display: none;
    flex-direction: column;
    padding: 20px 40px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.student-dashboard.show {
    display: flex;
    opacity: 1;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    color: white;
}

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

.header-main h2 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.dash-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.dash-btn {
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dash-btn.freeze {
    background: #38bdf8;
    color: white;
}

.dash-btn.warning {
    background: #f59e0b;
    color: white;
}

.dash-btn.danger {
    background: #ef4444;
    color: white;
}

.dash-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.student-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding: 10px 0 40px;
    align-content: flex-start;
}

.student-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    gap: 12px;
    min-height: 60px;
}

.student-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.student-card.offline {
    opacity: 0.6;
    filter: grayscale(0.2);
}

/* Compact Inner Layout (Mirrors presence.css) */
.student-avatar-small {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.student-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

.student-location-pill {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Action Buttons */
.card-actions-mini {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-mini-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.action-mini-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 100px 0;
    font-size: 1.2rem;
}

/* Student Hand Raise Button Pulse */
#btn-raise-hand.active {
    background: #f59e0b;
    color: white;
    border-color: #fbbf24;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Frozen Overlay for Students */
.frozen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    z-index: var(--z-modal);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.frozen-overlay.show {
    display: flex;
}

/* View Only Mode - More transparent, but still blocks clicks */
.frozen-overlay.view-only {
    background: rgba(0, 0, 0, 0.05);
    /* Almost clear */
    backdrop-filter: none;
    /* No blur */
}

/* Hide the giant icon/text in view-only mode */
.frozen-overlay.view-only i.fa-snowflake,
.frozen-overlay.view-only p,
.frozen-overlay.view-only h2 {
    display: none;
}

/* Optional: Add a small badge for lock state */
.frozen-overlay.view-only::after {
    content: 'View Only (Locked)';
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ea580c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

/* ======== VIEW ONLY MODE OVERRIDES ======== */
/* When lesson is locked (View Only), allow interaction with Navigation Tabs */
body.view-only-mode #navSystem,
body.view-only-mode #onenote-nav {
    z-index: calc(var(--z-modal) + 1) !important;
    /* Above frozen-overlay */
    pointer-events: auto !important;
}

.frozen-overlay i {
    font-size: 5rem;
    color: #38bdf8;
    margin-bottom: 24px;
    animation: drift 3s ease-in-out infinite;
}

@keyframes drift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}
/* Feedback Mode Bar (Missing in original CSS) */
/* This bar appears when the teacher inspects a student's work */
.feedback-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150px); /* Hidden above */
    background: #4f46e5; /* Indigo */
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 99999; /* Higher than everything */
    font-family: 'Inter', sans-serif;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.feedback-bar.show {
    transform: translateX(-50%) translateY(0);
}

.feedback-bar i {
    font-size: 1.2rem;
    color: #a5b4fc;
}

.feedback-bar span {
    font-size: 1rem;
    font-weight: 500;
}

.feedback-bar strong {
    color: white;
    font-weight: 700;
}

.feedback-bar .btn-exit-feedback {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 10px;
}

.feedback-bar .btn-exit-feedback:hover {
    background: white;
    color: #4f46e5;
    transform: scale(1.05);
}
