* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- Header Container --- */
.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

/* --- School Header и Author Name --- */
.school-header {
    margin: 10px 0 5px 0; /* Отступ сверху 10px, снизу 5px */
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем содержимое по горизонтали */
}
.school-header h2 {
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 5px 0; /* Отступ снизу только у заголовка школы */
    padding: 5px 10px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}
/* --- Author Name (ниже школы) --- */
.author-name {
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: bold;
    padding: 5px 10px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    font-style: normal;
    text-align: center;
    margin: 0 0 15px 0; /* Отступ снизу 15px для отделения от следующего блока */
}

h1 {
    text-align: center;
    color: #333;
    margin: 0;
    font-size: 2.5em;
}

.sound-control {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.sound-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #28a745;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}
.sound-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}
.sound-btn.active {
    background: #dc3545;
}
.sound-status {
    font-weight: bold;
    color: #495057;
}
.sound-status.enabled {
    color: #28a745;
}
.current-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.current-time, .current-date, .current-day {
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}
.current-time h2, .current-date h2, .current-day h2 {
    color: #666;
    font-size: 1.4em;
    margin-bottom: 10px;
}
#current-time, #current-date, #current-day {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2em;
}
.current-status {
    margin-bottom: 30px;
}
.status-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}
.status-card h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}
.status-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.status-item.time-left-container {
    grid-column: 1 / -1;
    justify-content: center;
    background: #fff3cd;
    border: 2px solid #ffc107;
}
.status-item.full-width {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.status-label {
    font-weight: bold;
    color: #495057;
    min-width: 120px;
}
.status-value {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    text-align: right;
    min-width: 80px;
}
.time-left {
    font-size: 1.5em;
    color: #dc3545;
    animation: pulse 2s infinite;
    font-weight: bold;
    padding: 10px 20px;
    background: #fff;
    border-radius: 10px;
    border: 2px solid #dc3545;
}
.progress-bar {
    width: 100%;
    height: 25px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-left: 10px;
    flex: 1;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 1s ease;
    width: 0%;
}
.lesson-type-lesson {
    background: #d4edda;
    color: #155724;
}
.lesson-type-break {
    background: #fff3cd;
    color: #856404;
}
.lesson-info {
    margin-bottom: 30px;
}
.info-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}
.next-event p {
    margin: 10px 0;
    font-size: 1.1em;
}
.schedule-container {
    margin-top: 30px;
}
.day-selector {
    margin-bottom: 20px;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}
.day-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.day-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #6c757d;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}
.day-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}
.day-btn.active {
    background: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}
.schedule {
    overflow-x: auto;
}
.schedule h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}
.schedule table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 800px;
}
.schedule th,
.schedule td {
    padding: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}
.schedule th {
    background: #343a40;
    color: white;
    position: sticky;
    top: 0;
}
.schedule tr:nth-child(even) {
    background: #f8f9fa;
}
.schedule tr:hover {
    background: #e9ecef;
}
.current-lesson {
    background: #d4edda !important;
    font-weight: bold;
}
.current-break {
    background: #fff3cd !important;
    font-weight: bold;
}
.break-time {
    color: #6c757d;
    font-style: italic;
}
.empty-schedule {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}
.warning-active {
    background: #ffc107;
    color: #000;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .school-header {
        margin-top: 10px;
        align-items: center;
    }
    .school-header h2 {
        font-size: 1.1em;
    }
    .author-name {
        font-size: 1.1em;
        margin-top: 5px;
    }
    h1 {
        font-size: 2em;
        order: 1;
    }
    .sound-control {
        flex-direction: column;
        gap: 10px;
    }
    .sound-btn {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .current-info {
        grid-template-columns: 1fr;
    }
    .status-content {
        grid-template-columns: 1fr;
    }
    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .status-item.time-left-container {
        align-items: center;
        text-align: center;
    }
    .status-item.full-width {
        flex-direction: column;
    }
    .progress-bar {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }
    .status-label {
        min-width: auto;
    }
    .status-value {
        min-width: auto;
        text-align: left;
    }
    .time-left {
        font-size: 1.3em;
        padding: 8px 15px;
    }
    .day-buttons {
        flex-direction: column;
    }
    .day-btn {
        width: 100%;
    }
    .schedule {
        font-size: 0.9em;
    }
    .schedule th,
    .schedule td {
        padding: 8px;
    }
}
