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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 1040px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.clock-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.time {
    font-size: 4rem;
    font-weight: bold;
    text-align: center;
    color: #00ffff;
    letter-spacing: 5px;
    margin-bottom: 15px;
    will-change: contents;
}

.date {
    text-align: center;
    font-size: 1.3rem;
    color: #b8b8ff;
}

/* ============================================ */
/* 📅 SCHEDULE GRID - FLEXBOX */
/* ============================================ */

.schedule-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

/* 📱 MOBIL - Pod sebou */
@media (max-width: 1050px) {
    .schedule-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* 🖥️ DESKTOP - Vedle sebe */
@media (min-width: 1051px) {
    .schedule-grid {
        flex-direction: row;
        max-width: 1040px;
    }
}

/* ============================================ */
/* 📚 LESSON BOX */
/* ============================================ */

.lesson-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-height: 200px;
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: border-color 0.3s ease;
    will-change: border-color;
}

/* 📱 MOBIL - Responzivní šířka */
@media (max-width: 550px) {
    .lesson-box {
        width: 100%;
        max-width: 500px;
    }
}

.lesson-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 10px;
}

.lesson-time {
    font-size: 1.2rem;
    color: #ffaa00;
    font-weight: bold;
}

.no-lesson {
    font-size: 1.5rem;
    color: #888;
}

/* ============================================ */
/* ⏱️ COUNTDOWN BOX */
/* ============================================ */

.countdown-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-height: 200px;
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

/* 📱 MOBIL - Responzivní šířka */
@media (max-width: 550px) {
    .countdown-box {
        width: 100%;
        max-width: 500px;
    }
}

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

/* COUNTDOWN HEADER */
.countdown-header {
    font-size: 1.2rem;
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

/* COUNTDOWN TIME */
.countdown-time {
    font-size: 3rem;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* PROGRESS BAR */
.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ffff);
    border-radius: 15px;
    transition: width 0.5s ease, background-color 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* SHIMMER ANIMACE */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* COUNTDOWN INFO */
.countdown-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: #b8b8ff;
}

.start-time,
.end-time {
    text-align: left;
    padding: 5px 0;
}

/* ============================================ */
/* 🖥️ FULLSCREEN BUTTON */
/* ============================================ */

.fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 255, 255, 0.15);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 10px;
    padding: 10px 15px;
    color: #00ffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.fullscreen-btn:hover {
    background: rgba(0, 255, 255, 0.25);
    border-color: #00ffff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

.fullscreen-icon {
    display: block;
    line-height: 1;
}

/* ============================================ */
/* 📊 PERFORMANCE MODE */
/* ============================================ */

.performance-mode {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    color: #0f0;
}

/* ============================================ */
/* 📱 MOBILE RESPONSIVE */
/* ============================================ */

@media (max-width: 768px) {
    .fullscreen-btn {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 1.2rem;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 3rem;
        letter-spacing: 3px;
    }
    
    .lesson-name {
        font-size: 2rem;
    }
    
    .lesson-time {
        font-size: 1rem;
    }
    
    .fullscreen-btn {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 1rem;
    }
    
    .countdown-time {
        font-size: 2.5rem;
    }
    
    .countdown-header {
        font-size: 1rem;
    }
    
    .progress-bar {
        height: 25px;
    }
    
    .countdown-info {
        font-size: 0.8rem;
    }
}

/* ============================================ */
/* 🖥️ FULLSCREEN MODE */
/* ============================================ */

body:fullscreen,
body:-webkit-full-screen,
body:-moz-full-screen {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    padding: 0;
    margin: 0;
    overflow: hidden;
}

body:fullscreen .container,
body:-webkit-full-screen .container,
body:-moz-full-screen .container {
    max-width: 1040px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

body:fullscreen .time,
body:-webkit-full-screen .time,
body:-moz-full-screen .time {
    font-size: 5rem;
}

body:fullscreen .date,
body:-webkit-full-screen .date,
body:-moz-full-screen .date {
    font-size: 1.5rem;
}

body:fullscreen .lesson-name,
body:-webkit-full-screen .lesson-name,
body:-moz-full-screen .lesson-name {
    font-size: 3rem;
}

body:fullscreen .countdown-time,
body:-webkit-full-screen .countdown-time,
body:-moz-full-screen .countdown-time {
    font-size: 3.5rem;
}

body:fullscreen .countdown-header,
body:-webkit-full-screen .countdown-header,
body:-moz-full-screen .countdown-header {
    font-size: 1.5rem;
}

/* Mobile fullscreen */
@media (max-width: 768px) {
    body:fullscreen .time,
    body:-webkit-full-screen .time,
    body:-moz-full-screen .time {
        font-size: 4rem;
    }
    
    body:fullscreen .lesson-name,
    body:-webkit-full-screen .lesson-name,
    body:-moz-full-screen .lesson-name {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body:fullscreen .time,
    body:-webkit-full-screen .time,
    body:-moz-full-screen .time {
        font-size: 3rem;
    }
    
    body:fullscreen .lesson-name,
    body:-webkit-full-screen .lesson-name,
    body:-moz-full-screen .lesson-name {
        font-size: 2rem;
    }
}