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

body {
    font-family: 'Inter', sans-serif;
    background:#0f111a;
    height: 100vh;
    color: #333;
    overflow: hidden; /* Prevent scrolling */
}

.container {
    height: 100vh;
    padding: 15px 15px 100px 15px; /* Added bottom padding for hardware bar */
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header Styles - Compact for TV */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: #667eea;
    margin-top: 5px;
}

.title-status-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.system-status {
    margin: 0;
}

.class-info {
    text-align: center;
}

.class-info h2 {
    font-size: 1.2rem;
    font-weight: 1000;
    color: #002fff;
    margin-bottom: 8px;
}

.datetime-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
}

.time-date-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.datetime-info p {
    font-size: 1.5rem;
    color: #000;
    font-weight: 700;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

#currentTime {
    font-size: 1.5rem;
}

.system-status {
    margin-top: 8px;
}

.status-indicator {
    padding: 6px 12px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
        border: 2px solid #000;

}

.status-indicator i {
    margin-right: 6px;
    display: inline-block;
}

.status-indicator i {
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.attendance-stats {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    color: white;
    min-width: 80px;
    border: 2px solid #000;
}

.stat-item.present {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stat-item.absent {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Main Content - Dynamic Layout */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-height: 0;
    width: 100%;
    align-items: stretch;
}

.regular-mode, .free-period-mode {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    width: 100%;
    height: calc(100vh - 320px); /* Increased space for hardware section */
    align-items: start;
    margin-bottom: 80px; /* Increased margin to prevent overlap */
    padding-bottom: 20px;
}

.students-section, .timetable-section, .task-section, .leaderboard-section, .progress-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    justify-content: flex-start;
    align-items: stretch;
    margin-bottom: -10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    flex-shrink: 0;
    width: 100%;
    min-width: 0;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-shrink: 0;
}

.present-section .section-header h3 i {
    color: #28a745;
}

.absent-section .section-header h3 i {
    color: #dc3545;
}

.timetable-section .section-header h3 i {
    color: #17a2b8;
}

.task-section .section-header h3 i {
    color: #ff6b35;
}

.leaderboard-section .section-header h3 i {
    color: #ffc107;
}

.progress-section .section-header h3 i {
    color: #28a745;
}

.count-badge, .current-period, .task-timer, .leaderboard-update, .progress-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 0;
}

.current-period {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    animation: currentPeriodPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

@keyframes currentPeriodPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    }
}

.task-timer {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    animation: taskTimerPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

@keyframes taskTimerPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    }
}

.leaderboard-update {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    animation: leaderboardPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

@keyframes leaderboardPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
    }
}

.progress-count {
    background: linear-gradient(135deg, #28a745, #20c997);
    animation: progressPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

@keyframes progressPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
    }
}

/* Task Section Styles */
.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f0, #ffe8d6);
    border-radius: 10px;
    border: 2px solid #ff6b35;
    width: 100%;
    overflow-y: auto;
    height: calc(100% - 50px);
    margin-bottom: 30px;
}

.task-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.1);
    text-align: center;
    width: 100%;
}

.task-description {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 400px;
    text-align: center;
    width: 100%;
}

.task-instructions {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
    margin-bottom: 15px;
    text-align: left;
    max-width: 400px;
    width: 100%;
}

.task-instructions h4 {
    color: #ff6b35;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.task-instructions ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 0.85rem;
}

.task-instructions li {
    margin-bottom: 5px;
}

.task-motivation {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

/* Leaderboard Section Styles */
.leaderboard-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    width: 100%;
    height: auto;
    overflow: visible;
    margin-bottom: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 1px solid #000;
    margin-bottom: 2px;
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 1px solid #000;
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border: 1px solid #000;
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    border: 1px solid #000;
}

.rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.leaderboard-item.top-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.leaderboard-item.top-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.leaderboard-item.top-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: white;
}

.leaderboard-item:not(.top-1):not(.top-2):not(.top-3) .rank-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.student-info-leaderboard {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.student-name-leaderboard {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-roll-leaderboard {
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-display {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
    white-space: nowrap;
    border: 1px solid #000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Progress Section Styles */
.daily-tasks-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    width: 100%;
    height: calc(100% - 50px);
    overflow-y: auto;
    margin-bottom: 10px;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.task-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.task-details {
    flex: 1;
    min-width: 0;
}

.task-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.task-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 10px 0;
}

.task-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.status-badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 8px;
    background: #f0f0f0;
    color: #666;
}

.status-badge.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.in-progress {
    background: #fff3e0;
    color: #ef6c00;
}

.start-task-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-task-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.start-task-btn:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}

.task-refresh {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
    animation: taskRefreshPulse 2s infinite;
}

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

.progress-bar-container {
    background: #f8f9fa;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
}

.progress-stat {
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 0;
}

.progress-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 5px;
}

.progress-stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Students Grid - Compact for TV */
.students-grid.compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 8px;
    width: 100%;
    justify-items: center;
    align-items: start;
}

.student-card {
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
    height: fit-content;
    min-height: 90px;
    max-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.student-card.present {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9, #e8f5e8);
}

.student-card.absent {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8, #f5e8e8);
}

.student-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.student-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.student-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.2;
    flex-shrink: 0;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-roll {
    font-size: 0.65rem;
    color: #666;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 3px;
    flex-shrink: 0;
}

.student-time {
    font-size: 0.6rem;
    color: #999;
    font-style: italic;
    flex-shrink: 0;
    margin-top: 2px;
    text-align: center;
    width: 100%;
}

/* Timetable Section - Compact for TV */
.timetable-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    width: 100%;
    height: 100%;
}

.period-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 60px;
}

.period-card.current {
    border-left-color: #ff6b35;
    background: linear-gradient(135deg, #fff5f0, #ffe8d6);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
    border: 2px solid #ff6b35;
    animation: currentPeriodGlow 3s ease-in-out infinite;
}

@keyframes currentPeriodGlow {
    0%, 100% { 
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
        border-color: #ff6b35;
    }
    50% { 
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
        border-color: #ff8c42;
    }
}

.period-card.current::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    animation: currentPeriodDot 2s ease-in-out infinite;
}

@keyframes currentPeriodDot {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.period-card.completed {
    border-left-color: #6c757d;
    opacity: 0.7;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.period-card.upcoming {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
}

.period-card.free {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fffbf0, #fef7e0);
}

.period-card.free.current {
    border-left-color: #ff6b35;
    background: linear-gradient(135deg, #fff5f0, #ffe8d6);
    border-color: #ff6b35;
}

.period-time {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.7rem;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.period-card.current .period-time {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

.period-card.completed .period-time {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.period-card.upcoming .period-time {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.period-card.free .period-time {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.period-card.free.current .period-time {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.period-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.period-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.period-card.current .period-name {
    color: #ff6b35;
    font-weight: 700;
}

.period-subject {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.period-card.current .period-subject {
    color: #e55a2b;
    font-weight: 500;
}

.period-teacher {
    font-size: 0.6rem;
    color: #999;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.period-card.current .period-teacher {
    color: #e55a2b;
    font-weight: 500;
}

.period-activity {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 500;
    margin-top: 4px;
    display: inline-block;
    white-space: nowrap;
}

.period-card.current .period-activity {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Hardware Status Bar - Compact */
.hardware-status-bar {
    background: #fffffff2;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px;
    margin: 0px 100px 20px 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: calc(100% - 200px);
    position: fixed;
    bottom: -7px;
    left: 0;
    right: 0;
    z-index: 900;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.status-item i {
    font-size: 1rem;
    color: #667eea;
    flex-shrink: 0;
}

.status-text {
    font-weight: 600;
    color: #28a745;
    white-space: nowrap;
}

.status-text.offline {
    color: #dc3545;
}

.status-text.warning {
    color: #ffc107;
}

/* Admin Panel */
.admin-panel {
    position: fixed;
    bottom: 90px;
    left: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 320px;
    max-width: 400px;
    transform-origin: bottom left;
    animation: panelSlideUp 0.3s ease-out;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.admin-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.admin-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.test-mode-buttons {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

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

.btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

/* Floating Action Button */
.fab {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    bottom: 85px; /* Adjusted to be above hardware status bar */
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.admin-fab {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    left: 20px;
    bottom: 10px;
}

.test-mode-fab {
    background: linear-gradient(135deg, #28a745, #20c997);
    right: 25px;
    bottom: 10px;
}

.test-mode-fab:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

/* Empty state styling */
.empty-message {
    text-align: center;
    padding: 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.empty-message i {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 10px;
}

.empty-message p {
    font-size: 0.9rem;
    font-weight: 500;
}





/* Common scrollbar styling */
.task-content::-webkit-scrollbar,
.leaderboard-grid::-webkit-scrollbar,
.progress-content::-webkit-scrollbar,
.timetable-grid::-webkit-scrollbar {
    width: 6px;
}

.task-content::-webkit-scrollbar-track,
.leaderboard-grid::-webkit-scrollbar-track,
.progress-content::-webkit-scrollbar-track,
.timetable-grid::-webkit-scrollbar-track {
    background: transparent;
}

.task-content::-webkit-scrollbar-thumb,
.leaderboard-grid::-webkit-scrollbar-thumb,
.progress-content::-webkit-scrollbar-thumb,
.timetable-grid::-webkit-scrollbar-thumb {
    background-color: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.task-content::-webkit-scrollbar-thumb:hover,
.leaderboard-grid::-webkit-scrollbar-thumb:hover,
.progress-content::-webkit-scrollbar-thumb:hover,
.timetable-grid::-webkit-scrollbar-thumb:hover {
    background-color: rgba(102, 126, 234, 0.8);
}

/* Timetable scrollbar styling */
.timetable-grid::-webkit-scrollbar {
    width: 6px;
}

.timetable-grid::-webkit-scrollbar-track {
    background: transparent;
}

.timetable-grid::-webkit-scrollbar-thumb {
    background-color: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.timetable-grid::-webkit-scrollbar-thumb:hover {
    background-color: rgba(102, 126, 234, 0.8);
}

/* Prevent text selection for TV display */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth animations for TV */
* {
    transition: all 0.2s ease;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #667eea;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.notification-content i {
    font-size: 1.2rem;
    color: #667eea;
}

.notification-success .notification-content i {
    color: #28a745;
}

.notification-error .notification-content i {
    color: #dc3545;
}

.notification-info .notification-content i {
    color: #17a2b8;
}

.notification-content span {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #f0f0f0;
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* TV-specific notification adjustments */
@media (min-width: 1920px) {
    .notification {
        top: 30px;
        right: 30px;
        padding: 20px 25px;
        min-width: 400px;
        max-width: 500px;
        font-size: 1rem;
    }
    
    .notification-content span {
        font-size: 1rem;
    }
}
