:root {
    --bg-color: #f4f5f7;
    --container-bg: transparent;
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --input-bg: #ffffff;
    --primary-color: #4f46e5;
    --primary-hover: #3730a3;
    --danger-color: #f44336;
    --danger-hover: #d32f2f;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --header-bg: #ffffff;
    --autocomplete-hover: #f8f9ff;
    --autocomplete-border: #e0e0e0;
    --disabled-bg: #cbd5e1;
    --select-bg: #ffffff;
    --select-text: #333333;
    --select-border: #4f46e5;
    --gradient-start: #4361ee;
    --gradient-mid: #3a0ca3;
    --gradient-end: #4f46e5;
    --select-option-hover: #f0f0f0;
    --select-option-selected: #4f46e5;
    --card-bg-rgb: 255, 255, 255;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --news-bg: #ffffff;
    --news-header-bg: linear-gradient(135deg, #4361ee, #4f46e5);
    --news-footer-bg: #f8f9fa;
    --news-border: #e0e0e0;
    --tooltip-bg: #ffffff;
    --select-bg-light: rgba(255, 255, 255, 0.98);
    --select-bg-dark: rgba(30, 30, 40, 0.98);
    --select-border-light: rgba(79, 70, 229, 0.2);
    --select-border-dark: rgba(129, 131, 245, 0.3);
    --select-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.1);
    --select-shadow-hover: 0 15px 30px -12px rgba(79, 70, 229, 0.2);
    --option-hover-light: #f5f3ff;
    --option-hover-dark: #2d2d3a;
}

body.dark-theme {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --card-bg: #333333;
    --border-color: #404040;
    --input-bg: #404040;
    --primary-color: #8183f5;
    --primary-hover: #a5a7fa;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --shadow: 0 2px 5px rgba(0,0,0,0.3);
    --header-bg: #333333;
    --autocomplete-hover: #404040;
    --autocomplete-border: #404040;
    --disabled-bg: #4a4a4a;
    --select-bg: #404040;
    --select-text: #e0e0e0;
    --select-border: #8183f5;
    --gradient-start: #8183f5;
    --gradient-mid: #c3b5ff;
    --gradient-end: #a5a7fa;
    --select-option-hover: #4a4a4a;
    --select-option-selected: #8183f5;
    --card-bg-rgb: 51, 51, 51;
    --modal-overlay: rgba(0, 0, 0, 0.7);
    --news-bg: #333333;
    --news-header-bg: linear-gradient(135deg, #8183f5, #a5a7fa);
    --news-footer-bg: #2d2d2d;
    --news-border: #404040;
    --tooltip-bg: #333333;
}

* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

*:focus,
*:focus-visible,
*:focus-within,
:focus,
:focus-visible,
:focus-within {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

::-moz-focus-inner,
::-moz-focus-outer {
    border: 0 !important;
    outline: none !important;
}

:focus-visible {
    outline: none !important;
}

.gradient-title,
.gradient-title *,
h1,
h1 * {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    text-decoration: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

@media (max-width: 767px) {
    * {
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }
    .gradient-title,
    .gradient-title:focus,
    .gradient-title:focus-visible,
    .gradient-title:active,
    .gradient-title:hover {
        outline: none !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
    }
    a, button, .nav-btn, .gradient-title, h1 {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    background: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    position: relative;
}

.container {
    max-width: 900px;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding: 10px;
    padding-bottom: 80px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.header-with-theme {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 5px 0;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    min-height: 70px; /* фиксация высоты для предотвращения смещений */
}

h1 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.gradient-title {
    background: linear-gradient(120deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: softGradientFlow 8s ease infinite;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 8px rgba(255, 255, 255, 0.15);
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    display: flex;
    align-items: center;
}

#animated-title {
    display: inline-block;
    line-height: 1.2;
    vertical-align: middle;
}

@keyframes softGradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    padding: 4px 10px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    height: 32px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.theme-label {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
}

/* ===== СТИЛИ ДЛЯ АККАУНТА ===== */
.account-menu {
    position: relative;
}

.account-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    font-size: 22px;
}

.account-login-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.account-dropdown {
    position: relative;
    display: inline-block;
}

.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    padding: 0;
}

.account-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.account-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}

.account-dropdown.active .account-dropdown-content {
    display: block;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--autocomplete-hover);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info i {
    font-size: 28px;
    color: var(--primary-color);
}

.dropdown-username {
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.account-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.account-dropdown-content a i {
    width: 20px;
    color: var(--primary-color);
    opacity: 0.8;
}

.account-dropdown-content a:hover {
    background: var(--autocomplete-hover);
}

.role-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-admin { background: #ef4444; }
.role-starosta { background: #10b981; }
.role-teacher { background: #3b82f6; }
.role-student { background: #6b7280; }
.role-none { background: #9ca3af; }

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 40px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
}

.nav-btn i {
    font-size: 16px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.group-selector {
    max-width: 500px;
    width: 100%;
    margin: 0 auto 15px auto;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: visible !important;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.autocomplete {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
    overflow: visible !important;
}

.input-with-settings {
    position: relative;
    width: 100%;
    overflow: visible !important;
}

#group-input,
#teacher-input {
    width: 100%;
    padding: 12px;
    padding-right: 45px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background: var(--input-bg);
    color: var(--text-color);
}

#group-input:focus,
#teacher-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#group-input::placeholder,
#teacher-input::placeholder {
    color: #888;
}

.settings-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-color);
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: var(--shadow);
    padding: 0;
    line-height: 1;
}

.settings-button:hover {
    transform: translateY(-50%) rotate(30deg);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--autocomplete-hover);
}

.settings-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-50%) rotate(90deg);
}

.settings-button.active:hover {
    transform: translateY(-50%) rotate(90deg) scale(1.1);
}

.settings-modal {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 240px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    z-index: 1000;
    overflow: visible !important;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-modal-header {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-modal-header .close-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    padding: 0;
}

.settings-modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.settings-modal-body {
    padding: 12px;
    overflow: visible !important;
}

.settings-option {
    margin-bottom: 8px;
    overflow: visible !important;
    position: relative;
}

.settings-option:last-child {
    margin-bottom: 0;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    color: var(--text-color);
    font-size: 13px;
    position: relative;
    padding: 4px 0;
    overflow: visible !important;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary-color);
}

.option-text {
    flex: 1;
}

.info-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: help;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.2);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: bold;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
    line-height: 1;
    cursor: help;
}

.info-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.global-tooltip {
    position: fixed;
    transform: translateX(-50%) translateY(-100%);
    background: var(--tooltip-bg);
    color: var(--text-color);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    z-index: 100000;
    max-width: 280px;
    white-space: normal;
    text-align: left;
    line-height: 1.5;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

.global-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--border-color) transparent transparent transparent;
}

.global-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: var(--tooltip-bg) transparent transparent transparent;
    z-index: 1;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-90%); }
    to { opacity: 1; transform: translateX(-50%) translateY(-100%); }
}

body.dark-theme .global-tooltip {
    background: var(--tooltip-bg);
    border-color: var(--border-color);
}

body.dark-theme .global-tooltip::before {
    border-color: var(--tooltip-bg) transparent transparent transparent;
}

.mode-indicators {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mode-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.raw-mode-indicator {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.raw-mode-indicator span {
    font-weight: bold;
}

.ai-mode-indicator {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    color: #667eea;
    border: 1px solid #667eea;
    animation: aiPulse 2s infinite;
}

.ai-mode-indicator span {
    font-weight: bold;
}

@keyframes aiPulse {
    0% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }
    100% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2); }
}

body.dark-theme .raw-mode-indicator {
    background: rgba(129, 131, 245, 0.2);
    color: #a5a7fa;
    border-color: #a5a7fa;
}

body.dark-theme .ai-mode-indicator {
    background: linear-gradient(135deg, #8183f530, #9f7aea30);
    color: #a5a7fa;
    border-color: #a5a7fa;
}

.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--autocomplete-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    box-shadow: var(--shadow);
    margin-top: 2px;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    color: var(--text-color);
    font-size: 14px;
    word-break: break-word;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: var(--autocomplete-hover);
}

.autocomplete-item strong {
    color: var(--primary-color);
    font-weight: bold;
}

.autocomplete-item.group-item {
    padding: 10px 12px;
}

.group-display {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 14px;
}

.group-course-small {
    font-size: 11px;
    color: var(--primary-color);
    opacity: 0.8;
}

.group-match-reason {
    font-size: 10px;
    color: #667eea;
    margin-top: 2px;
    font-style: italic;
}

.ai-match-score {
    font-size: 9px;
    color: #667eea;
    margin-left: 6px;
    padding: 2px 6px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

body.dark-theme .ai-match-score {
    color: #a5a7fa;
    background: rgba(129, 131, 245, 0.15);
}

.ai-match-item {
    border-left: 3px solid #667eea !important;
}

#select-group-btn,
#select-teacher-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}

#select-group-btn:hover:not(:disabled),
#select-teacher-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

#select-group-btn:disabled,
#select-teacher-btn:disabled {
    background: var(--disabled-bg);
    cursor: not-allowed;
    opacity: 0.6;
}

.header-with-reset {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--header-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.header-with-reset h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-select-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--select-shadow);
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.modern-select-section:hover {
    box-shadow: var(--select-shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.modern-select-title {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.6;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.modern-select-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.modern-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 260px;
    min-width: 220px;
}

.modern-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--select-shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 10;
}

.modern-select-button:hover {
    border-color: var(--primary-color);
    box-shadow: var(--select-shadow-hover);
    transform: translateY(-1px);
}

.select-button-content {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
}

.select-icon {
    font-size: 1.2em;
    opacity: 0.7;
    flex-shrink: 0;
}

.select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.95em;
}

.today-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 6px;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.select-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: var(--text-color);
    opacity: 0.5;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
}

.modern-select-button[aria-expanded="true"] .select-arrow {
    transform: rotate(180deg);
    opacity: 0.8;
}

.modern-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.modern-select-dropdown.active {
    max-height: 350px;
    opacity: 1;
    transform: translateY(0);
    overflow: visible;
    pointer-events: all;
}

.dropdown-header {
    display: none;
}

.dropdown-options {
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
}

.dropdown-option {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    margin: 2px 0;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-option:hover {
    background: var(--option-hover-light);
}

body.dark-theme .dropdown-option:hover {
    background: var(--option-hover-dark);
}

.dropdown-option .option-text {
    font-weight: 500;
    font-size: 0.95em;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-option .option-date {
    font-size: 0.8em;
    color: var(--primary-color);
    opacity: 0.6;
    background: transparent;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 4px;
}

.dropdown-option .option-badge {
    display: none;
}

.dropdown-option .option-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 8px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.dropdown-options::-webkit-scrollbar {
    width: 4px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 20px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

@media (max-width: 767px) {
    .modern-select-wrapper {
        position: relative;
        z-index: auto;
    }
    .modern-select-wrapper.active-dropdown {
        z-index: 10000 !important;
    }
    .modern-select-dropdown {
        position: absolute;
        z-index: 999999;
    }
    .modern-select-grid {
        gap: 8px;
    }
    .modern-select-wrapper {
        width: 100%;
        margin-bottom: 4px;
    }
    .modern-select-dropdown {
        max-height: 250px;
        width: 100%;
        left: 0;
        right: 0;
    }
    .modern-select-dropdown.active {
        max-height: 250px;
    }
    .dropdown-options {
        max-height: 220px;
    }
    .modern-select-wrapper.active-dropdown::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 99999;
        pointer-events: none;
    }
}

.support-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.support-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.support-icon {
    font-size: 22px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.reset-btn {
    padding: 6px 16px;
    border-radius: 30px;
    border: none;
    background: var(--danger-color);
    color: white;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 5px rgba(244, 67, 54, 0.3);
}

.reset-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.4);
}

.day-schedule {
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.day-schedule h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.3em;
    text-align: center;
    position: relative;
    padding-bottom: 8px;
}

.day-schedule h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

.lesson {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    color: var(--text-color);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.lesson:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.lesson.empty {
    opacity: 0.7;
    background: var(--disabled-bg);
    border: 1px dashed var(--border-color);
}

.lesson.empty:hover {
    transform: none;
    border-color: var(--border-color);
}

.lesson.lecture {
    border-left: 4px solid #4f46e5;
}

.lesson.practice {
    border-left: 4px solid #10b981;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.pair-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pair-number {
    font-weight: bold;
    font-size: 1.1em;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 3px 10px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

.pair-time {
    font-size: 0.8em;
    color: var(--text-color);
    font-weight: 500;
    background: var(--input-bg);
    padding: 3px 8px;
    border-radius: 16px;
    display: inline-block;
    align-self: flex-start;
    border: 1px solid var(--border-color);
}

.lesson-type {
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.lecture-badge {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
}

.practice-badge {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.lesson-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.lesson-teacher,
.lesson-room,
.lesson-groups {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* .lesson-teacher:before {
    content: "👨‍🏫";
    margin-right: 4px;
    opacity: 0.7;
    font-size: 0.9em;
}

.lesson-room:before {
    content: "📍";
    margin-right: 4px;
    opacity: 0.7;
    font-size: 0.9em;
}

.lesson-groups:before {
    content: "👥";
    margin-right: 4px;
    opacity: 0.7;
    font-size: 0.9em;
} */

.lesson-groups strong {
    opacity: 1;
    color: var(--primary-color);
    margin-right: 4px;
}

.lesson-note {
    margin-top: 6px;
    padding: 5px 10px;
    font-size: 0.85em;
    color: #f59e0b;
    font-style: italic;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    border-left: 3px solid #f59e0b;
}

.empty-text {
    color: var(--text-color);
    opacity: 0.5;
    font-style: italic;
    font-size: 0.9em;
    display: block;
    margin-top: 4px;
}

.no-schedule {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    color: var(--text-color);
    opacity: 0.7;
    font-size: 1.1em;
    border: 2px dashed var(--border-color);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-teacher-selected {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    color: var(--text-color);
    font-size: 1.1em;
    border: 2px dashed var(--border-color);
    margin-top: 20px;
}

.no-teacher-selected p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.current-week-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
    font-weight: 500;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.week-icon {
    font-size: 1.1em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    flex-shrink: 0;
}

.week-text {
    font-size: 0.9em;
    white-space: nowrap;
}

.week-date {
    font-size: 0.8em;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

.group-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.group-info h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-course {
    font-size: 0.8em;
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
    padding: 2px 8px;
    border-radius: 16px;
    display: inline-block;
    width: fit-content;
}

.footer {
    margin-top: auto;
    padding: 15px 0 5px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.footer-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gradient-start), var(--gradient-end), var(--gradient-start), transparent);
    margin-bottom: 12px;
    opacity: 0.4;
    animation: linePulse 4s ease infinite;
}

@keyframes linePulse {
    0% { opacity: 0.2; }
    50% { opacity: 0.5; }
    100% { opacity: 0.2; }
}

.footer-text {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.5;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.footer-text:hover {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85em;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    opacity: 0.7;
}

.footer-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
    border-color: var(--primary-color);
    opacity: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.news-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 2000;
    max-width: 90%;
    width: 450px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.news-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.news-modal-content {
    background: var(--news-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.news-modal-header {
    background: var(--news-header-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.news-modal-title {
    margin: 0;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.news-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.news-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.news-modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
    color: var(--text-color);
    line-height: 1.5;
    font-size: 15px;
}

.news-modal-body h1 { font-size: 1.4em; margin-bottom: 12px; }
.news-modal-body h2 { font-size: 1.2em; margin-bottom: 10px; }
.news-modal-body h3 { font-size: 1.1em; margin-bottom: 8px; }
.news-modal-body p { margin-bottom: 12px; }
.news-modal-body b, .news-modal-body strong { color: var(--primary-color); }
.news-modal-body ul, .news-modal-body ol { margin: 12px 0; padding-left: 20px; }
.news-modal-body li { margin-bottom: 5px; }

.news-modal-footer {
    background: var(--news-footer-bg);
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .container {
        max-width: 900px;
    }
    h1 {
        font-size: 2rem;
    }
    .theme-toggle {
        height: 36px;
        padding: 4px 12px;
    }
    .switch {
        width: 46px;
        height: 22px;
    }
    .slider:before {
        height: 18px;
        width: 18px;
    }
    input:checked + .slider:before {
        transform: translateX(24px);
    }
    .theme-label {
        font-size: 18px;
    }
    .current-week-badge {
        padding: 8px 16px;
    }
}

@media (max-width: 767px) {
    body {
        padding: 0;
    }
    .container {
        padding: 8px;
        padding-bottom: 70px;
        max-width: 100%;
    }
    .nav-tabs {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 14px;
        box-sizing: border-box;
    }
    .header-with-reset {
        flex-direction: column;
        text-align: center;
        padding: 12px;
        width: 100%;
    }
    .header-with-reset h2 {
        text-align: center;
        white-space: normal;
        word-break: break-word;
        width: 100%;
        font-size: 1rem;
    }
    .group-info {
        align-items: center;
        width: 100%;
    }
    .reset-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    .group-selector {
        width: 100%;
        padding: 12px;
    }
    .input-with-settings {
        width: 100%;
    }
    #group-input,
    #teacher-input {
        padding-right: 45px;
        font-size: 16px;
    }
    .settings-button {
        width: 32px;
        height: 32px;
        right: 6px;
        font-size: 16px;
    }
    .settings-modal {
        width: 220px;
        right: 0;
        left: auto;
        transform: none;
        position: absolute;
    }
    .settings-modal-header {
        padding: 6px 10px;
        font-size: 11px;
    }
    .settings-modal-body {
        padding: 10px;
    }
    .settings-option label {
        font-size: 12px;
        gap: 8px;
    }
    .mode-indicators {
        gap: 6px;
    }
    .mode-indicator {
        padding: 3px 8px;
        font-size: 10px;
    }
    .global-tooltip {
        max-width: 250px;
        font-size: 12px;
        padding: 10px 14px;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        animation: mobileTooltipFadeIn 0.2s ease;
    }
    .global-tooltip::after,
    .global-tooltip::before {
        display: none;
    }
    @keyframes mobileTooltipFadeIn {
        from { opacity: 0; transform: translate(-50%, -45%); }
        to { opacity: 1; transform: translate(-50%, -50%); }
    }
    .modern-select-section {
        padding: 16px;
    }
    .modern-select-title {
        font-size: 0.8em;
        margin-bottom: 12px;
    }
    .modern-select-wrapper {
        max-width: 100%;
        min-width: 100%;
    }
    .modern-select-button {
        padding: 12px 14px;
    }
    .select-icon {
        font-size: 1.1em;
    }
    .select-text {
        font-size: 0.9em;
    }
    .select-arrow {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    .dropdown-option {
        padding: 12px 14px;
        font-size: 14px;
    }
    .dropdown-option .option-date {
        font-size: 0.75em;
    }
    .autocomplete-items {
        max-height: 180px;
        width: 100%;
    }
    .autocomplete-item {
        padding: 12px;
        font-size: 14px;
    }
    .group-display {
        font-size: 14px;
    }
    .group-course-small {
        font-size: 10px;
    }
    .group-match-reason {
        font-size: 9px;
    }
    .ai-match-score {
        font-size: 8px;
        padding: 1px 4px;
    }
    .current-week-badge {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
        font-size: 13px;
    }
    .week-text {
        white-space: normal;
        text-align: center;
    }
    .week-date {
        font-size: 11px;
    }
    .lesson-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .lesson-type {
        align-self: flex-start;
    }
    .lesson {
        padding: 12px;
    }
    .pair-number {
        font-size: 1em;
        padding: 4px 10px;
    }
    .pair-time {
        font-size: 0.75em;
    }
    .news-modal {
        max-width: 95%;
    }
    .news-modal-header {
        padding: 12px 16px;
    }
    .news-modal-title {
        font-size: 1.2em;
    }
    .news-modal-body {
        padding: 16px;
        font-size: 14px;
        max-height: 45vh;
    }
    .footer {
        padding: 10px 0 5px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    .theme-toggle {
        padding: 4px 8px;
    }
    .theme-label {
        font-size: 15px;
    }
    .switch {
        width: 38px;
        height: 19px;
    }
    .slider:before {
        height: 15px;
        width: 15px;
    }
    input:checked + .slider:before {
        transform: translateX(19px);
    }
    .current-week-badge {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .week-text {
        white-space: normal;
        text-align: center;
        font-size: 0.85em;
    }
    .week-date {
        font-size: 0.8em;
    }
    .autocomplete-items {
        max-height: 160px;
    }
    .settings-modal {
        width: 200px;
    }
    .global-tooltip {
        max-width: 220px;
        font-size: 11px;
        padding: 8px 12px;
    }
}

@media (max-width: 360px) {
    .theme-toggle {
        padding: 4px 6px;
        gap: 4px;
    }
    .switch {
        width: 36px;
        height: 18px;
    }
    .slider:before {
        height: 14px;
        width: 14px;
    }
    input:checked + .slider:before {
        transform: translateX(18px);
    }
    .theme-label {
        font-size: 14px;
    }
    h1 {
        font-size: 1.3rem;
    }
    #group-input,
    #teacher-input {
        font-size: 14px;
        padding: 10px;
        padding-right: 40px;
    }
    .settings-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    .settings-modal {
        width: 180px;
    }
    .settings-option label {
        font-size: 11px;
    }
    .global-tooltip {
        max-width: 200px;
        font-size: 10px;
        padding: 6px 10px;
    }
}

/* ===== КНОПКА ОТМЕТКИ (ДЛЯ TEACHER.HTML) ===== */
.mark-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
}

.mark-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.mark-button-clicked {
    animation: markPop 0.3s ease;
}

@keyframes markPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(0); opacity: 0; }
}

.select-icon {
    overflow: visible !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
}
.select-button-content {
    overflow: visible !important;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 8px;
}

.site-title i {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #f59e0b, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-kfu {
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.title-schedule {
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0.9;
    margin-left: -2px;
}

.site-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

/* ===== ШРИФТЫ ДЛЯ АНИМАЦИИ ЗАГОЛОВКА ===== */
@font-face {
    font-family: 'Minecraft Title Cyrillic';
    src: url('/static/fonts/minecraft_title_cyrillic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

#animated-title {
    display: inline-block;
    line-height: 1.2;
    vertical-align: middle;
}

.font-sekuya { font-family: 'Sekuya', sans-serif !important; }
.font-anton { font-family: 'Anton', sans-serif !important; }
.font-minecraft { font-family: 'Minecraft Title Cyrillic', cursive !important; }
.font-russo { font-family: 'Russo One', sans-serif !important; }
.font-luckiest-guy { font-family: 'Luckiest Guy', cursive !important; }
.font-rubik-glitch { font-family: 'Rubik Glitch Pop', system-ui !important; }
.font-finger-paint { font-family: 'Finger Paint', cursive !important; }
.font-macondo { font-family: 'Macondo', cursive !important; }
.font-kablammo { font-family: 'Kablammo', system-ui !important; }
.font-modak { font-family: 'Modak', system-ui !important; }
.font-gluten { font-family: 'Gluten', cursive !important; }
.font-ribeye { font-family: 'Ribeye Marrow', cursive !important; }
.font-bangers { font-family: 'Bangers', system-ui !important; }
.font-sigmar-one { font-family: 'Sigmar One', system-ui !important; }