:root {
    --primary-color: #3b82f6;   
    --primary-dark: #2563eb;
    --secondary-color: #8b5cf6;
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;

    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);

    --radius: 8px;
    
    /* Улучшенные шрифты */
    --font-family: 'Segoe UI', system-ui, -apple-system, 'Roboto', 'Helvetica Neue', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    
    /* Межстрочные интервалы */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-normal);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* ===== УЛУЧШЕННАЯ ТИПОГРАФИКА ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-height-tight);
    color: var(--text-color);
    margin-bottom: 0.5em;
}

h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

h4 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: 1em;
    line-height: var(--line-height-relaxed);
}

small {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ===== ШАПКА ===== */
header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: 700;
    white-space: nowrap;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: url('../icons/logo.png') center/contain no-repeat;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: levitate 3s ease-in-out infinite;
}

@keyframes levitate {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    max-width: 300px;
}

.user-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

.user-badge.admin {
    background: var(--error-color);
}

.user-badge.judge {
    background: var(--success-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Ссылки навигации */
.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-link.logout {
    background: rgba(220, 53, 69, 0.3);
}

.nav-link.logout:hover {
    background: rgba(220, 53, 69, 0.5);
}

.nav-link.login {
    background: rgba(40, 167, 69, 0.3);
}

.nav-link.login:hover {
    background: rgba(40, 167, 69, 0.5);
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropbtn {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    font-weight: 500;
}

.nav-dropbtn:hover {
    background: rgba(255,255,255,0.2);
}

.nav-dropbtn.active {
    background: rgba(255,255,255,0.3);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg-color);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    right: 0;
}

.nav-dropdown-content.show {
    display: block;
    animation: dropdownAppear 0.2s ease-out;
}

@keyframes dropdownAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-content a {
    color: var(--text-color);
    padding: 10px 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.nav-dropdown-content a:hover {
    background: var(--bg-secondary);
}

.nav-dropdown-content a:last-child {
    border-bottom: none;
}

/* ===== ОСНОВНЫЕ КОНТЕЙНЕРЫ ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 140px);
}

.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== ФОРМА АВТОРИЗАЦИИ ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-color);
    padding: 20px;
}

.login-form {
    background: var(--bg-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

/* Группы форм */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: var(--font-size-base);
    transition: border-color 0.3s;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Сообщения об ошибках */
.error {
    background: #7f1d1d;
    color: #fecaca;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--error-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: var(--line-height-tight);
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-bottom: 30px;
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== УЛУЧШЕННЫЕ КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    min-height: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Цветовые варианты кнопок */
.btn-success {
    background: var(--success-color);
    border-color: #0da271;
    color: white;
}

.btn-success:hover {
    background: #0da271;
}

.btn-warning {
    background: var(--warning-color);
    color: #212529;
    border-color: #e69500;
}

.btn-warning:hover {
    background: #e69500;
}

.btn-danger {
    background: var(--error-color);
    border-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 8px 12px;
    font-size: var(--font-size-xs);
    min-height: 32px;
    gap: 4px;
}

/* Кнопки для таблиц */
.btn-table {
    padding: 6px 10px;
    font-size: var(--font-size-xs);
    min-height: 28px;
    white-space: nowrap;
    margin: 2px;
}

/* ===== ЗАГОЛОВКИ СТРАНИЦ ===== */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-text {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: var(--line-height-relaxed);
}

/* ===== СЕТКА ТЕМ ===== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.topic-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--success-color);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.topic-card h3 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: var(--line-height-tight);
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: var(--line-height-relaxed);
    font-weight: 500;
    flex-grow: 1;
    font-size: var(--font-size-sm);
}

.topic-card button {
    width: 100%;
    margin-top: auto;
}

/* ===== КОНТЕЙНЕР КЛАССОВ ===== */
.classes-container {
    margin-top: 30px;
}

.classes-list {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.classes-list h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

/* ===== УЛУЧШЕННЫЕ ТАБЛИЦЫ ===== */
.table-responsive {
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    min-width: 600px;
    font-size: var(--font-size-sm);
}

th, td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    line-height: var(--line-height-normal);
    vertical-align: middle;
}

th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    padding: 14px 10px;
}

td {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}

tr:hover {
    background-color: rgba(55, 65, 81, 0.3);
}

/* ===== СТАТУСЫ ОЦЕНОК - БЕЗ ФОНА ===== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: var(--font-size-sm);
    padding: 4px 0;
    white-space: nowrap;
}

.status.confirmed {
    color: var(--success-color);
}

.status.pending {
    color: var(--warning-color);
}

.status.not-rated {
    color: var(--error-color);
}

/* Кнопка оценки */
.btn-rate {
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    font-weight: 600;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    line-height: 1.2;
}

.btn-rate:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== СТАТИСТИКА АДМИНКИ ===== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--text-color);
    margin: 8px 0;
    line-height: 1;
}

.stat-card p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* ===== КАРТОЧКИ ДЕЙСТВИЙ АДМИНА ===== */
.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.action-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 5px solid var(--success-color);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.action-card h3 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: var(--line-height-tight);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: var(--line-height-relaxed);
    flex-grow: 1;
}

.action-card .btn {
    width: 100%;
    margin-top: auto;
}

/* ===== ЛАЙАУТ АДМИНКИ ===== */
.admin-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-top: 25px;
}

.add-form {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: fit-content;
    border: 1px solid var(--border-color);
}

.list-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Таблицы админки */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: var(--font-size-sm);
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    line-height: var(--line-height-normal);
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.admin-table td {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}

/* ===== БЕЙДЖИ ===== */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}

.badge.admin {
    background: var(--error-color);
    color: white;
}

.badge.judge {
    background: var(--success-color);
    color: white;
}

.badge.confirmed {
    background: var(--success-color);
    color: white;
}

.badge.pending {
    background: var(--warning-color);
    color: #212529;
}

/* ===== СООБЩЕНИЯ ===== */
.success {
    background: #064e3b;
    color: #a7f3d0;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--success-color);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.error {
    background: #7f1d1d;
    color: #fecaca;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--error-color);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

/* ===== ФОРМЫ ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.scores-list {
    margin-top: 25px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: var(--font-size-base);
    transition: border-color 0.3s;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 42px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: var(--line-height-normal);
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: modalAppear 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.modal-body {
    padding: 20px 25px;
}
.close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--text-color);
}

.scoring-modal {
    max-width: 450px;
}

.confirmation-modal {
    max-width: 400px;
}

.scoring-info {
    margin-bottom: 20px;
}

.class-info h4 {
    margin: 0 0 6px 0;
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: var(--line-height-tight);
}

.class-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.score-input-section {
    margin-top: 20px;
}

.score-input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

.score-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-input-container input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: var(--font-size-lg);
    font-weight: bold;
    text-align: center;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 44px;
}

.score-range {
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    font-size: var(--font-size-sm);
}

.confirmation-info {
    text-align: center;
}

.confirmation-warning {
    color: var(--warning-color);
    font-size: var(--font-size-sm);
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 3px solid var(--warning-color);
    line-height: var(--line-height-normal);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
    min-height: 44px;
}

/* ===== КНОПКИ ОЦЕНОК ===== */
.score-buttons-section {
    margin-top: 20px;
}

.score-buttons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.score-btn {
    padding: 12px 8px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.score-btn.selected {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
    transform: scale(1.05);
}

.selected-score-display {
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
    margin-top: 10px;
    font-size: var(--font-size-sm);
}

#selectedScoreValue {
    color: var(--success-color);
    font-size: var(--font-size-lg);
    font-weight: bold;
    margin-left: 5px;
}

/* результаты */
.results-table {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 15px;
}

.filters {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

/* ===== ФУТЕР ===== */
footer {
    background: var(--bg-secondary);
    color: var(--text-color);
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

/* ===== СОСТОЯНИЯ ЗАГРУЗКИ ===== */
.loading {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

.no-results, .no-classes {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

/* ===== ВСПЛЫВАЮЩИЕ УВЕДОМЛЕНИЯ ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--success-color);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    border: 1px solid var(--border-color);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: auto;
}

.toast-close:hover {
    color: var(--text-color);
}

.score-display {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    font-weight: bold;
}

.rank-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

.results-table-container {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 15px;
}

.text-muted {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ===== СИСТЕМА ИКОНОК ===== */
.icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    animation: iconLevitate 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes iconLevitate {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.05);
    }
}

.icon:before {
    display: none !important;
}

/* Базовые пути к иконкам */
.icon-home { background-image: url('../icons/home.png'); }
.icon-results { background-image: url('../icons/results.png'); }
.icon-login { background-image: url('../icons/login.png'); }
.icon-logout { background-image: url('../icons/logout.png'); }
.icon-admin { background-image: url('../icons/admin.png'); }
.icon-judge { background-image: url('../icons/judge.png'); }
.icon-dashboard { background-image: url('../icons/dashboard.png'); }
.icon-settings { background-image: url('../icons/settings.png'); }
.icon-crown { background-image: url('../icons/crown.png'); }
.icon-chart { background-image: url('../icons/chart.png'); }
.icon-scale { background-image: url('../icons/scale.png'); }
.icon-success { background-image: url('../icons/success.png'); }
.icon-warning { background-image: url('../icons/warning.png'); }
.icon-error { background-image: url('../icons/error.png'); }

.icon {
    background-color: transparent !important;
}

.nav-link .icon,
.nav-dropbtn .icon,
.btn .icon {
    animation: iconLevitate 2s ease-in-out infinite;
}

.nav-link .icon,
.nav-dropbtn .icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.btn .icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.logo .icon {
    width: 25px;
    height: 25px;
    margin-right: 8px;
}

.toast.success .toast-icon { background-image: url('../icons/success.png'); }
.toast.error .toast-icon { background-image: url('../icons/error.png'); }
.toast.warning .toast-icon { background-image: url('../icons/warning.png'); }

.status.confirmed::before,
.status.pending::before, 
.status.not-rated::before {
    display: none !important;
}

/* Скрываем статистику в панели жюри */
.panel-dashboard .stats-cards {
    display: none;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .topics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
    }
    
    .admin-actions {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .admin-content {
        gap: 20px;
    }
    
    .hero-title {
        font-size: clamp(1.4rem, 3.5vw, 2rem);
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .hero-title {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 2px 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 10px 15px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .user-info {
        justify-content: center;
        width: 100%;
        max-width: none;
        padding: 8px 16px;
    }
    
    .user-name {
        max-width: none;
        font-size: var(--font-size-base);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }
    
    .nav-link {
        justify-content: center;
        padding: 12px 15px;
        width: 100%;
        font-size: var(--font-size-base);
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropbtn {
        width: 100%;
        justify-content: center;
        padding: 12px 15px;
        font-size: var(--font-size-base);
    }
    
    .nav-dropdown-content {
        position: static;
        width: 100%;
        min-width: auto;
        margin-top: 5px;
    }
    
    /* Таблицы */
    .table-responsive {
        margin: 10px -5px;
        border-radius: 6px;
        font-size: 0.9em;
    }
    
    table {
        min-width: 500px;
        font-size: var(--font-size-xs);
    }
    
    th, td {
        padding: 10px 8px;
        white-space: normal;
        line-height: 1.3;
        max-width: 120px;
        font-size: var(--font-size-xs);
    }
    
    /* Скрываем менее важные колонки */
    .admin-table th:nth-child(n+4),
    .admin-table td:nth-child(n+4) {
        display: none;
    }
    
    .results-table th:nth-child(4),
    .results-table td:nth-child(4),
    .results-table th:nth-child(5),
    .results-table td:nth-child(5) {
        display: none;
    }
    
    /* Кнопки */
    .btn-rate, .btn-sm {
        padding: 6px 8px;
        font-size: var(--font-size-xs);
        min-height: 32px;
        white-space: normal;
        line-height: 1.2;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: var(--font-size-sm);
        min-height: 44px;
    }
    
    /* Карточки */
    .topic-card, .action-card {
        padding: 20px;
    }
    
    .topic-card h3, .action-card h3 {
        font-size: var(--font-size-base);
    }
    
    /* Формы */
    .admin-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .add-form, .list-section {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-form .form-group {
        min-width: 100%;
    }
    
    /* Статистика */
    .admin-stats,
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    /* Модальные окна */
    .modal-content {
        margin: 10px;
        padding: 15px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    /* Кнопки оценок */
    .score-buttons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .score-btn {
        padding: 10px 5px;
        font-size: var(--font-size-base);
        min-height: 44px;
    }
    
    /* Логин */
    .login-form {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .login-form h2 {
        font-size: var(--font-size-xl);
    }
}

/* ===== МАЛЕНЬКИЕ ТЕЛЕФОНЫ ===== */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .admin-stats,
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    table {
        min-width: 400px;
        font-size: var(--font-size-xs);
    }
    
    th, td {
        padding: 8px 6px;
        font-size: var(--font-size-xs);
    }
    
    .score-buttons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .score-btn {
        padding: 8px 4px;
        font-size: var(--font-size-sm);
        min-height: 40px;
    }
    
    .logo {
        font-size: var(--font-size-base);
    }
    
    /* Скрываем еще колонки */
    .admin-table th:nth-child(n+3),
    .admin-table td:nth-child(n+3) {
        display: none;
    }
    
    .results-table th:nth-child(n+3),
    .results-table td:nth-child(n+3) {
        display: none;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ТЕЛЕФОНЫ ===== */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.3rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        grid-template-columns: 1fr;
    }
    
    table {
        min-width: 320px;
    }
    
    th, td {
        padding: 6px 4px;
        font-size: var(--font-size-xs);
    }
    
    .btn {
        padding: 10px 12px;
        font-size: var(--font-size-xs);
    }
    
    .score-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== ДОСТУПНОСТЬ ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== УТИЛИТЫ ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }