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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 30px;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo-img {
    height: 48px;
    width: auto;
}

.title-text {
    font-size: 1.8rem;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .title-text {
        font-size: 1.5rem;
    }
}

h2, h3 {
    color: #444;
    margin: 20px 0 15px;
}

.filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filters label {
    flex: 1;
    min-width: 150px;
}

.filters select, .filters button {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.filters select:focus, .filters button:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.filters button {
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    flex: 0 0 auto;
}

.filters button:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.week-navigation a {
    text-decoration: none;
    padding: 8px 16px;
    background: white;
    color: #667eea;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.week-navigation a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.week-navigation span {
    font-weight: bold;
    color: #555;
}

.schedule {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.day-block {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.day-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.day-block h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 1.3em;
}

.lesson {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    transition: background 0.2s;
}

.lesson:hover {
    background: #f8f9fa;
}

.lesson .time {
    font-weight: bold;
    min-width: 100px;
    color: #667eea;
}

.lesson .subject {
    flex: 1;
    font-weight: 500;
}

.lesson .type {
    color: #888;
    font-style: italic;
}

.lesson .classroom {
    background: #e7f3ff;
    color: #0066cc;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.date-badge {
    background: #ffc107;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.info {
    text-align: center;
    padding: 40px;
    color: #888;
    background: #f8f9fa;
    border-radius: 15px;
}

.admin-link {
    text-align: center;
    margin-top: 30px;
}

.admin-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 8px;
    transition: all 0.3s;
}

.admin-link a:hover {
    background: #667eea;
    color: white;
}

/* Админка */
.admin-menu {
    background: #333;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: #444;
    border-radius: 8px;
    transition: all 0.3s;
}

.admin-menu a:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.admin-content {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.admin-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-content th, .admin-content td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.admin-content th {
    background: #f2f2f2;
    font-weight: bold;
}

.admin-content input[type="text"],
.admin-content input[type="number"],
.admin-content select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.admin-content button {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    margin: 2px;
}

.admin-content button:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.clear-button {
    background: #dc3545 !important;
    padding: 10px 20px !important;
    margin-top: 20px !important;
    font-weight: bold;
}

.clear-button:hover {
    background: #c82333 !important;
}

.message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .lesson {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lesson .time {
        min-width: auto;
    }
    
    .filters form {
        flex-direction: column;
    }
    
    .filters label {
        width: 100%;
    }
    
    .admin-menu {
        flex-direction: column;
    }
    
    .admin-menu a {
        text-align: center;
    }
    
    .admin-content table {
        display: block;
        overflow-x: auto;
    }
    
    .week-navigation {
        flex-direction: column;
        text-align: center;
    }
}