/**
 * Единый CSS для всего сайта регистрации команд МГУ
 * Использует CSS переменные для цветовых тем мероприятий
 */

/* ============================================
   ПЕРЕМЕННЫЕ
   ============================================ */
:root {
    --primary: #488AC6;
    --primary-dark: #2c5f8d;
    --primary-soft: #e3f0ff;
    --text-main: #10243f;
    --text-muted: #6b7b8a;
    --surface: #ffffff;
    --background-gradient-start: #e8f2ff;
    --background-gradient-end: #ffffff;
    --shadow: 0 24px 52px rgba(36, 73, 128, 0.16);
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
    color: var(--text-main);
    min-height: 100vh;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   LAYOUT
   ============================================ */
.page {
    padding: 28px 16px 80px;
}

.layout {
    max-width: 960px;
    margin: 0 auto;
}

.layout-narrow {
    max-width: 820px;
    margin: 0 auto;
}

/* ============================================
   HERO CARD
   ============================================ */
.hero-card {
    max-width: 960px;
    margin: 0 auto 36px;
    padding: 52px 38px;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 26px 60px rgba(54, 110, 168, 0.32);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    pointer-events: none;
}

.hero-card > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    margin: 22px 0 14px;
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-card .hero-actions {
    justify-content: center;
}

.hero-card a,
.hero-card a:hover,
.hero-card a:focus,
.hero-card .btn:hover {
    text-decoration: none;
}

.hero-card .btn-primary {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 12px 26px rgba(15, 55, 110, 0.28);
}

.hero-card .btn-primary:hover {
    box-shadow: 0 16px 32px rgba(15, 55, 110, 0.32);
}

.hero-card .btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.hero-card .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   CONTENT CARDS
   ============================================ */
.content-card {
    background: var(--surface);
    padding: 28px 30px;
    border-radius: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.standalone-block {
    background: var(--surface);
    padding: 28px 30px;
    border-radius: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

/* ============================================
   HEADERS & TEXT
   ============================================ */
.section-header {
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 0 30px;
}

.section-title {
    margin: 0 0 24px;
    font-size: 24px;
    color: var(--primary-dark);
    text-align: center;
}

/* ============================================
   LINKS
   ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: none;
    opacity: 0.75;
}

.breadcrumbs {
    margin-bottom: 18px;
    font-size: 15px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .breadcrumbs__sep {
    margin: 0 6px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Колонка длинного текста: ~68 знаков в строке */
.text-column {
    max-width: 68ch;
}

/* Заголовок раздела страницы (h2 под hero), выровнен влево */
.page-section-title {
    margin: 48px 0 24px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
}

/* Пояснение второго плана (что будет дальше, как вернуть) */
.note-muted {
    color: var(--text-muted);
}

/* Второстепенная ссылка под кнопками («Все игры») */
.page-links {
    margin: 0 0 18px;
    text-align: center;
    font-size: 14px;
}

.page-links a {
    font-weight: 600;
}

/* ============================================
   БЛОКИ УВЕДОМЛЕНИЙ
   ============================================ */
.info-block {
    background: rgba(72, 138, 198, 0.2);
    border: 1px solid rgba(72, 138, 198, 0.3);
    padding: 20px 30px;
    margin-bottom: 26px;
    border-radius: 18px;
    line-height: 1.65;
    color: var(--text-main);
    box-shadow: var(--shadow);
}

.info-block strong {
    color: var(--text-main);
}

.info-block p {
    margin: 10px 0;
}

.info-block p:first-of-type {
    margin-top: 0;
}

.info-block p:last-child {
    margin-bottom: 0;
}

.info-block ul {
    margin: 10px 0;
    padding-left: 1.2em;
}

.info-block li + li {
    margin-top: 4px;
}

.info-block ul:last-child {
    margin-bottom: 0;
}

/* «⚠️ Неполные данные» — без плашки и рамки, внимание привлекает только ⚠️:
   на экране проверки (forms.js) и на страницах успеха */
.confirm-warnings {
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-main);
}

.confirm-warnings__title {
    font-weight: 700;
    margin: 0 0 8px;
}

.confirm-warning {
    margin: 0 0 10px;
}

.confirm-warning p {
    margin: 0 0 2px;
}

.confirm-warning ul {
    margin: 0;
    padding-left: 18px;
}

.info-block .confirm-warning:last-child {
    margin-bottom: 0;
}

.warning-block {
    background: rgba(255, 193, 7, 0.4);
    border: 1px solid rgba(255, 193, 7, 0.4);
    padding: 20px 30px;
    margin-bottom: 26px;
    border-radius: 18px;
    line-height: 1.65;
    color: var(--text-muted);
    box-shadow: var(--shadow);
}

.warning-block > strong {
    color: var(--text-main);
    font-size: 1.05em;
    display: block;
    margin-bottom: 8px;
}

.warning-block h3 {
    margin: 0 0 12px 0;
    color: var(--text-main);
    font-size: 18px;
}

.warning-block p {
    margin: 10px 0;
}

.warning-block p:first-of-type {
    margin-top: 0;
}

.warning-block p:last-child {
    margin-bottom: 0;
}

.warning-block ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.warning-block li {
    margin-bottom: 4px;
}

.success-block {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.45);
    padding: 20px 30px;
    margin-bottom: 26px;
    border-radius: 18px;
    line-height: 1.65;
    color: #1b5e20;
    box-shadow: var(--shadow);
}

.success-block strong {
    color: #1b5e20;
    font-size: 1.05em;
    display: block;
    margin-bottom: 8px;
}

.success-block h3 {
    margin: 0 0 12px 0;
    color: #1b5e20;
    font-size: 18px;
}

.success-block p {
    margin: 10px 0;
}

.success-block p:first-of-type {
    margin-top: 0;
}

.success-block p:last-child {
    margin-bottom: 0;
}

.danger-block {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.4);
    padding: 20px 30px;
    margin-bottom: 26px;
    border-radius: 18px;
    line-height: 1.65;
    color: #7f1d1d;
    box-shadow: var(--shadow);
}

.danger-block strong {
    color: #7f1d1d;
    font-size: 1.05em;
    display: block;
    margin-bottom: 8px;
}

.danger-block p {
    margin: 10px 0;
}

.danger-block p:first-of-type {
    margin-top: 0;
}

.danger-block p:last-child {
    margin-bottom: 0;
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn {
    padding: 14px 28px;
    border-radius: 999px;
    /* <button> не наследует шрифт страницы и рисуется по-своему (Arial,
       свои интервалы, системный вид в Safari) — набираем как ссылку .btn */
    font: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    text-transform: inherit;
    text-indent: 0;
    -webkit-appearance: none;
    appearance: none;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
    width: auto;
    margin-top: 0;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

a.btn, a.btn:hover, a.btn:focus,
.btn:hover, .btn:focus {
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(72, 138, 198, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 18px 36px rgba(72, 138, 198, 0.32);
}

/* Отступы для кнопок submit в формах */
.form .btn-primary {
    margin-bottom: 28px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-secondary {
    background: rgba(72, 138, 198, 0.12);
    color: var(--primary-dark);
}

.btn-secondary:hover {
    background: rgba(72, 138, 198, 0.2);
}

.btn-ghost {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.btn-ghost:hover {
    background: rgba(72, 138, 198, 0.16);
}

.green-button {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    box-shadow: 0 12px 26px rgba(5, 150, 105, 0.26);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0;
    margin-bottom: 20px;
    width: 100%;
}

.green-button:hover {
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #c81e1e 100%);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.28);
}

.btn-danger:hover {
    box-shadow: 0 20px 44px rgba(239, 68, 68, 0.32);
}

.btn-success {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.28);
}

.btn-success:hover {
    box-shadow: 0 20px 44px rgba(5, 150, 105, 0.32);
}

/* Базовые стили для элементов button (используются в формах, но не для кнопок с классом .btn) */
button:not(.btn):not(.delete-player-icon):not(.restore-player-btn):not(.undo-delete-btn) {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 14px 30px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 14px 30px rgba(72, 138, 198, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:not(.btn):not(.delete-player-icon):not(.restore-player-btn):not(.undo-delete-btn):hover {
    box-shadow: 0 18px 36px rgba(72, 138, 198, 0.32);
}

/* ============================================
   FORMS
   ============================================ */
.form-section {
    background: var(--surface);
    padding: 28px 30px;
    border-radius: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label,
label {
    display: block;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

label .required {
    color: #dc3545;
}

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    font-family: inherit;
    background: #fff;
    border: 1px solid rgba(72, 138, 198, 0.28);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Заблокированные поля (Вариант C: Минималистичный) */
input:disabled,
select:disabled,
textarea:disabled,
input.disabled-field,
select.disabled-field,
textarea.disabled-field {
    background: rgba(72, 138, 198, 0.08);
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    opacity: 1;
    cursor: not-allowed;
    border-color: rgba(72, 138, 198, 0.2);
}

input:disabled:focus,
select:disabled:focus,
textarea:disabled:focus,
input.disabled-field:focus,
select.disabled-field:focus,
textarea.disabled-field:focus {
    box-shadow: none;
    border-color: rgba(72, 138, 198, 0.2);
}

/* Заблокированные опции в select */
select:disabled option {
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

/* Заблокированные радиокнопки и чекбоксы */
input[type="radio"]:disabled,
input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Лейблы для заблокированных радиокнопок и чекбоксов */
input[type="radio"]:disabled + label,
input[type="checkbox"]:disabled + label,
label:has(input[type="radio"]:disabled),
label:has(input[type="checkbox"]:disabled) {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Для радио-списков с заблокированными полями */
.radio-list:has(input[type="radio"]:disabled) label,
.checkbox-list:has(input[type="checkbox"]:disabled) label {
    color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(72, 138, 198, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: rgba(16, 36, 63, 0.55);
    font-size: 15px;
    font-family: inherit;
}

.form-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
}

.error {
    margin-top: 10px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #a51d2a;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.error ul.errorlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error ul.errorlist li {
    margin: 0;
    padding: 0;
}

.help-text,
.help-text-spaced {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.instruction-box-in-form {
    background: #ffffff;
    padding: 16px 30px;
    margin-bottom: 20px;
    border-radius: 16px;
    line-height: 1.65;
    color: var(--text-muted);
    font-size: 15px;
    border: 1px solid rgba(72, 138, 198, 0.18);
    box-shadow: 0 8px 20px rgba(36, 73, 128, 0.08);
}

.instruction-box-in-form p:first-child {
    margin-top: 0;
}

.instruction-box-in-form p:last-child {
    margin-bottom: 0;
}

.instruction-box {
    background: #ffffff;
    padding: 20px 30px;
    margin-bottom: 26px;
    border-radius: 18px;
    line-height: 1.65;
    color: var(--text-muted);
    border: 1px solid rgba(72, 138, 198, 0.2);
    box-shadow: var(--shadow);
}

.instruction-box p:first-child {
    margin-top: 0;
}

.instruction-box p:last-child {
    margin-bottom: 0;
}

.required-note {
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.26);
    color: #8a5a00;
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
}

.radio-list,
.checkbox-list {
    background: rgba(72, 138, 198, 0.05);
    border-radius: 14px;
    border: 1px solid rgba(72, 138, 198, 0.12);
    padding: 14px 16px;
    margin-top: 12px;
}

.radio-list label,
.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0;
}

.radio-list label:last-child,
.checkbox-list label:last-child {
    padding-bottom: 0;
}

.radio-list label:first-child,
.checkbox-list label:first-child {
    padding-top: 0;
}

.radio-list input[type="radio"],
.checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.consent-checkbox,
.checkbox-single {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    gap: 15px;
}

.consent-checkbox input[type="checkbox"],
.checkbox-single input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.consent-checkbox label,
.checkbox-single label {
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.5;
    flex: 1;
    color: var(--text-main);
}

.instruction-text {
    color: var(--text-muted);
    padding: 0;
    line-height: 1.6;
    margin-bottom: 15px;
}

.section-deadline {
    font-weight: normal;
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================
   VALIDATION
   ============================================ */
.validation-error {
    display: none;
    color: #dc3545;
    margin-top: 5px;
    font-size: 14px;
}

.char-counter {
    float: right;
    color: #6c757d;
}

/* ============================================
   TEAM & PLAYER CARDS
   ============================================ */
.team-card {
    background: var(--surface);
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(36, 73, 128, 0.08);
    margin-bottom: 20px;
}

.team-card.cancelled {
    opacity: 0.6;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.team-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.team-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.team-badge.active {
    background: #e3f0ff;
    color: #488AC6;
}

.team-badge.waitlist {
    background: #fff3cd;
    color: #856404;
}

.team-badge.cancelled {
    background: #f5f5f5;
    color: #999;
}

.team-info {
    margin: 8px 0;
    color: var(--text-muted);
    font-size: 15px;
}

.team-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.player-form {
    background: var(--surface);
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(36, 73, 128, 0.08);
    margin-bottom: 20px;
    position: relative;
}

.player-form h3 {
    margin: 0 0 16px 0;
    color: var(--primary-dark);
    font-size: 18px;
}

.player-card {
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: rgba(72, 138, 198, 0.05);
    border: 1px solid rgba(72, 138, 198, 0.12);
}

.player-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.player-info {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.player-list li {
    /* интерлиньяж и шаг — как у строк блока «Основное» (dl.confirm-kv) */
    padding: 0;
    margin-bottom: 6px;
    color: var(--text-main);
}

.player-list li:last-child {
    margin-bottom: 0;
}

.player-list li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ============================================
   PLAYER MANAGEMENT (удаление/восстановление)
   ============================================ */

/* Блок «Ранее были в составе» и кнопки восстановления */
.remembered-players-box {
    margin-bottom: 20px;
}

.remembered-players-header {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.remembered-players-hint {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.remembered-players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.restore-player-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 7px 16px !important;
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    border: 1px solid rgba(72, 138, 198, 0.25) !important;
    border-radius: 999px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 !important;
    width: auto !important;
}

.restore-player-btn:hover {
    background: rgba(72, 138, 198, 0.18) !important;
    border-color: var(--primary) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(72, 138, 198, 0.18) !important;
}

.restore-player-faculty {
    opacity: 0.6;
    font-size: 12px;
    margin-left: 2px;
}

/* Кнопка удаления игрока (иконка крестика) */
.delete-player-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px !important;
    height: 32px;
    background: white !important;
    border: 2px solid #fee2e2 !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #dc3545 !important;
    font-size: 20px !important;
    font-weight: 700;
    line-height: 1;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 5;
}

.delete-player-icon:hover {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

.delete-player-icon:active {
    transform: scale(0.95);
}

/* Состояние "удалённого" игрока */
.player-form.player-deleted {
    opacity: 0.5;
    pointer-events: none;
    border: 2px dashed #fca5a5;
    background: #fef2f2;
    position: relative;
}

/* Разрешаем клики для кнопки отмены удаления */
.player-form.player-deleted .undo-delete-btn {
    pointer-events: auto;
}

.player-form.player-deleted::before {
    content: '✓ Удалён из состава';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Кнопка отмены удаления */
.undo-delete-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 40px)) !important;
    background: white !important;
    color: var(--primary-dark) !important;
    border: 2px solid var(--primary) !important;
    padding: 8px 20px !important;
    border-radius: 999px !important;
    font-weight: 600;
    font-size: 13px !important;
    cursor: pointer;
    z-index: 11;
    transition: all 0.2s;
    width: auto !important;
    margin: 0 !important;
}

.undo-delete-btn:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translate(-50%, calc(-50% + 40px)) !important;
}

/* Toast-уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    font-weight: 600;
    font-size: 14px;
    max-width: 320px;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background: #10b981;
    color: white;
}

.notification-warning {
    background: #f59e0b;
    color: white;
}

.notification-error {
    background: #dc3545;
    color: white;
}

/* Анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Загрузка (spinner) */
.delete-player-icon.loading {
    pointer-events: none;
    opacity: 0.6;
}

.delete-player-icon.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #dc3545;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 640px) {
    .delete-player-icon {
        top: 16px;
        right: 16px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ============================================
   EVENT LIST
   ============================================ */
.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.event-item {
    padding: 20px;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(36, 73, 128, 0.08);
}

.event-item h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-main);
}

.event-item p {
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 28px;
}

.event-card {
    background: var(--surface);
    border-radius: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease;
}

.event-card:hover {
    box-shadow: 0 24px 55px rgba(36, 73, 128, 0.18);
}

a.event-card,
a.event-card:hover {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-card__visual {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #dbe9ff 0%, #c4dbff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-card__visual--placeholder {
    padding: 24px;
}

.event-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.event-card__placeholder {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    text-align: center;
    line-height: 1.35;
}

.event-card__body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-card__badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    margin-bottom: 24px;
}

.event-card__badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(72, 138, 198, 0.08);
    color: var(--primary-dark);
}

.badge-blue { background: rgba(72, 138, 198, 0.18); color: #1c4e88; }
.badge-green { background: rgba(76, 175, 80, 0.18); color: #2f7c32; }
.badge-red { background: rgba(244, 67, 54, 0.16); color: #b71c1c; }
.badge-orange { background: rgba(255, 152, 0, 0.16); color: #a35a02; }
.badge-purple { background: rgba(156, 39, 176, 0.16); color: #6a1b9a; }
.badge-yellow { background: rgba(255, 214, 0, 0.22); color: #a98500; }
.badge-gray { background: rgba(120, 144, 156, 0.16); color: #455a64; }

.event-card__title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.35;
}

.event-card__title a {
    color: var(--text-main);
}

/* Заголовок карточки — ссылка, но без подчёркивания при наведении:
   на главной подчёркнутых ссылок не было, наведение показывает цвет */
.event-card__title a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Полоска заполненности: <progress value="28" max="40"> */
.event-card__meter {
    display: block;
    width: 100%;
    height: 6px;
    margin: 8px 0 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(72, 138, 198, 0.2);
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
}

.event-card__meter::-webkit-progress-bar {
    background: rgba(72, 138, 198, 0.2);
    border-radius: 999px;
}

.event-card__meter::-webkit-progress-value {
    background: var(--primary);
    border-radius: 999px;
}

.event-card__meter::-moz-progress-bar {
    background: var(--primary);
    border-radius: 999px;
}

.event-card__waitlist {
    display: block;
    color: var(--text-muted);
}

.event-card__info {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.event-card__info strong {
    color: var(--text-main);
}

.event-card__stats {
    margin: 20px 0 0;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}

.event-card__status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.event-card__status .status-note {
    font-weight: 500;
    opacity: 0.85;
}

.event-card__actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================================
   BANNER CARD (full-width tournament banner)
   ============================================ */
.event-banner {
    grid-column: 1 / -1;
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    transition: box-shadow 0.25s ease;
    box-shadow: 0 16px 40px rgba(18, 40, 80, 0.35);
    background:
        radial-gradient(circle at 80% 20%, rgba(72,138,198,0.35) 0%, transparent 50%),
        radial-gradient(circle at 15% 80%, rgba(44,95,141,0.25) 0%, transparent 40%),
        radial-gradient(circle at 60% 90%, rgba(53,111,175,0.2) 0%, transparent 35%),
        linear-gradient(135deg, #0f1f3d 0%, #1a3460 30%, #234a7a 60%, #2c5f8d 100%);
}

.event-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
}

.event-banner::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, transparent 40%, var(--event-banner-bottom-fade, rgba(15,31,61,0.5)) 100%);
    pointer-events: none;
}

.event-banner:hover {
    box-shadow: 0 24px 55px rgba(18, 40, 80, 0.45);
}

.event-banner__bg {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-banner__overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(0deg, rgba(15,31,61,0.85) 0%, rgba(15,31,61,0.3) 50%, rgba(15,31,61,0.05) 100%);
}

.event-banner__content {
    position: relative;
    z-index: 2;
    padding: 32px 36px;
    width: 100%;
}

.event-banner__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.event-banner__title a,
.event-banner__title a:hover {
    color: inherit;
    text-decoration: none;
}

.event-banner__text {
    margin: 0 0 20px;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    line-height: 1.5;
    max-width: 600px;
}

.event-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.event-banner .btn-primary {
    background: #ffffff;
    color: var(--event-banner-btn-color, #1a3460);
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.event-banner .btn-primary:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

.event-banner .btn-ghost {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.3);
}

.event-banner .btn-ghost:hover {
    background: rgba(255,255,255,0.2);
}

.event-banner__badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
}

.event-banner__badge.status-open {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

@media (max-width: 640px) {
    .event-banner {
        min-height: 200px;
    }

    .event-banner__content {
        padding: 24px 22px;
    }

    .event-banner__title {
        font-size: 22px;
    }

    .event-banner__text {
        font-size: 15px;
    }
}

/* ============================================
   РЕГУЛЯРНЫЕ ИГРЫ НА ГЛАВНОЙ (узкие полосы серий)
   Разметка — блок {% if series_cards %} в templates/home.html,
   знак серии — templates/_series_icon.html.

   Полоса белая, как карточки сайта. Фирменный у неё только «знак» слева:
   градиент цвета серии с тонкой штриховкой, белая иконка и название
   капсом — как обложка серии в соцсетях. Знак — ссылка на страницу
   серии. Дальше — в цветах сайта: дата, место, обычная кнопка сайта и
   срок записи текстом под ней. Записаться нельзя — на месте кнопки
   подписка на серию.

   Цвет приходит из EventSeries.get_homepage_style():
   style="--series-c1: #313177; --series-c2: #24336A;". Без него —
   гамма сайта. Контраст --series-c1 с белым не ниже 4,5:1 проверяет
   модель, поэтому на знаке читается белое название.
   ============================================ */
/* На широком экране полосы одной высоты: у какой-то серии строк больше
   (строка о пропуске), а знаки и кнопки должны стоять ровно */
.series-strips {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 14px;
}

.series-strip {
    --series-c1: #3a73a8;
    --series-c2: #2c5f8d;
    display: grid;
    /* Колонка действия — по ширине кнопки, у правого края: дата и место
       получают всё остальное и не переносятся без нужды. Кнопки полос
       выровнены по правому краю */
    grid-template-columns: 264px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 96px;
    background: var(--surface);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(36, 73, 128, 0.12);
}

/* --- Знак серии: ссылка на страницу серии --- */
.series-strip__title {
    align-self: stretch;
    margin: 0;
    font-size: inherit;
}

.series-strip__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    min-height: 96px;
    padding: 14px 18px 14px 24px;
    color: #ffffff;
    background-color: var(--series-c2);
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 9px),
        linear-gradient(135deg, var(--series-c1) 0%, var(--series-c2) 100%);
    text-decoration: none;
}

a.series-strip__brand,
a.series-strip__brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.series-strip__mark {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.series-strip__icon {
    display: block;
    width: 42px;
    height: 42px;
}

/* Серия без фирменной иконки: первая буква названия */
.series-strip__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

/* Длинное слово («Межфакультетские») переносится по слогам, а не рвётся
   посреди слога; короткие («Игровые») не переносятся. break-word — на
   случай браузера без русских переносов */
.series-strip__name {
    min-width: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.series-strip__brand:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: -8px;
}

/* --- Когда и где --- */
.series-strip__info {
    min-width: 0;
    padding: 14px 24px;
}

/* Дата ближайшей игры (или расписание серии) — подзаголовок полосы,
   цветом текста, как заголовки сайта */
.series-strip__when {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

/* Своё название игры этой недели («Кубок Воробьёвых гор») — под датой */
.series-strip__game {
    margin: 2px 0 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
}

.series-strip__where {
    margin: 3px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: #56677a;
}

/* До кнопки: пояснение организатора, а у «Только пропуск» без него — кому
   пропуск не нужен */
.series-strip__note {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-main);
}

/* --- Кнопка и срок записи --- */
.series-strip__act {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 14px 24px 14px 0;
}

/* Срок записи или что с игрой — обычным текстом под кнопкой, без бейджа:
   главное в полосе — дата и кнопка. Отмену и закрытую запись видно цветом */
.series-strip__status {
    max-width: 100%;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    text-wrap: balance;
    color: #56677a;
}

.series-strip__status--closed {
    color: #9b2c2c;
}

/* Записаться нельзя — подписка на серию на месте кнопки: кнопка (summary)
   раскрывает поле почты и «Подписаться», без перехода на страницу серии */
.series-strip__subscribe {
    max-width: 100%;
}

.series-strip__subscribe > summary {
    list-style: none;
    cursor: pointer;
}

.series-strip__subscribe > summary::-webkit-details-marker {
    display: none;
}

.series-strip__subscribe[open] > summary {
    display: none;
}

/* Раскрытая подписка: колонка действия — по содержимому, поэтому ширина
   «таблетки» задана сама (на планшете и телефоне — до ширины колонки) */
.series-strip__subscribe[open] {
    width: 360px;
    max-width: 100%;
}

.series-strip__act .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 224px;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
}

.series-strip__act .btn:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 3px;
}

/* --- Планшет: знак слева на всю высоту, кнопка и срок под датой.
   До 1000px три колонки не помещаются: дата и место переносились бы --- */
@media (max-width: 1000px) {
    .series-strips {
        grid-auto-rows: auto;
    }

    .series-strip {
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: start;
    }

    .series-strip__title {
        grid-row: 1 / span 2;
    }

    .series-strip__brand {
        padding: 14px 16px 14px 20px;
        gap: 10px;
    }

    .series-strip__mark,
    .series-strip__icon,
    .series-strip__letter {
        width: 36px;
        height: 36px;
    }

    .series-strip__name {
        font-size: 14px;
    }

    .series-strip__info {
        padding: 16px 20px 0;
    }

    /* Кнопка, под ней срок: кнопки соседних полос — на одной вертикали */
    .series-strip__act {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-width: 0;
        padding: 12px 20px 16px;
    }

    .series-strip__status {
        text-align: left;
    }

    .series-strip__act .btn {
        width: auto;
    }
}

/* --- Телефон: карточка, знак — полосой сверху --- */
@media (max-width: 640px) {
    .series-strips {
        gap: 16px;
    }

    .series-strip {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 24px;
    }

    .series-strip__title {
        grid-row: auto;
    }

    .series-strip__brand {
        min-height: 60px;
        padding: 10px 18px;
        gap: 12px;
    }

    .series-strip__mark,
    .series-strip__icon,
    .series-strip__letter {
        width: 36px;
        height: 36px;
    }

    .series-strip__letter {
        border-radius: 10px;
        font-size: 18px;
    }

    .series-strip__name {
        font-size: 16px;
    }

    .series-strip__info {
        padding: 14px 18px 0;
    }

    .series-strip__act {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 18px 18px;
    }

    .series-strip__status {
        text-align: center;
    }

    .series-strip__act .btn {
        width: 100%;
        padding: 10px 12px;
    }

    .series-strip__subscribe {
        width: 100%;
    }
}

/* ============================================
   ПОДПИСКА НА СЕРИЮ «ТАБЛЕТКОЙ» (_subscribe_pill.html)
   Как форма подписки у Бюро: поле почты и кнопка-стрелка — одно целое.
   Полоса серии на главной и страница серии. Стоит после полос: правила
   .series-strip__act .btn той же специфичности кнопку не перебивают.
   ============================================ */
.subscribe-pill {
    width: 100%;
}

.subscribe-pill__row {
    display: flex;
}

/* У поля скруглена левая сторона, у кнопки — правая */
.subscribe-pill input[type="email"] {
    flex: 1;
    width: auto;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px 10px 18px;
    border-right: 0;
    border-radius: 999px 0 0 999px;
    font-size: 14px;
}

/* Подсказка в поле — единственная видимая подпись: контраст не ниже 4,5:1 */
.subscribe-pill input::placeholder {
    color: #5c6b79;
    opacity: 1;
}

.subscribe-pill .subscribe-pill__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 64px;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0 6px 0 0;
    border-radius: 0 999px 999px 0;
    box-shadow: none;
    transition: background 0.4s ease;
}

/* Стрелка, индикатор, галочка: виден один значок — по классу формы */
.subscribe-pill__state {
    display: none;
}

.subscribe-pill:not(.is-loading):not(.is-subscribed) .subscribe-pill__state.is-default,
.subscribe-pill.is-loading .subscribe-pill__state.is-loading,
.subscribe-pill.is-subscribed .subscribe-pill__state.is-success {
    display: block;
}

.subscribe-pill__state.is-loading {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: subscribe-pill-spin 0.8s linear infinite;
}

.subscribe-pill.is-loading .subscribe-pill__submit {
    pointer-events: none;
}

/* Подписка оформлена: кнопка бледнеет, галочка «вздрагивает» один раз */
.subscribe-pill.is-subscribed .subscribe-pill__submit {
    background: #9fb6cc;
    cursor: default;
    pointer-events: none;
}

.subscribe-pill.is-subscribed .subscribe-pill__state.is-success {
    animation: subscribe-pill-pulse 0.52s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.subscribe-pill.is-subscribed input[type="email"] {
    color: var(--text-main);
    background: #ffffff;
}

/* Ошибка: красные рамка поля и кнопка */
.subscribe-pill.has-error input[type="email"] {
    border-color: #c53030;
    color: #9b2c2c;
}

.subscribe-pill.has-error .subscribe-pill__submit {
    background: #c53030;
}

/* Ошибка без скрипта (страница серии после отправки) — под «таблеткой» */
.subscribe-pill__error {
    margin: 6px 0 0;
    font-size: 14px;
}

@keyframes subscribe-pill-spin {
    to { transform: rotate(360deg); }
}

@keyframes subscribe-pill-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .subscribe-pill__state.is-loading,
    .subscribe-pill.is-subscribed .subscribe-pill__state.is-success {
        animation: none;
    }
}

/* Подпись поля и строка состояния — для экранного диктора */
.subscribe-pill__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Поле-ловушка для ботов: людям не видно и не доступно с клавиатуры */
.subscribe-pill__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   DAY BANNER CARD (tournament day cards)
   ============================================ */
.day-banner {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: box-shadow 0.25s ease;
    text-decoration: none;
    color: #ffffff;
}

a.day-banner,
a.day-banner:hover {
    text-decoration: none;
    color: #ffffff;
}

.day-banner--qualifier {
    box-shadow: 0 12px 32px rgba(36, 80, 150, 0.22);
    background:
        radial-gradient(circle at 75% 25%, rgba(100,170,230,0.3) 0%, transparent 50%),
        radial-gradient(circle at 20% 75%, rgba(72,138,198,0.2) 0%, transparent 40%),
        linear-gradient(135deg, #2c5f8d 0%, #3a7ab8 35%, #4a8fcf 70%, #5da3e0 100%);
}

.day-banner--qualifier::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

.day-banner--qualifier::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(30,60,110,0.35) 100%);
    pointer-events: none;
}

.day-banner--final {
    box-shadow: 0 12px 32px rgba(18, 40, 80, 0.3);
    background:
        radial-gradient(circle at 75% 25%, rgba(72,138,198,0.35) 0%, transparent 50%),
        radial-gradient(circle at 20% 75%, rgba(44,95,141,0.25) 0%, transparent 40%),
        linear-gradient(135deg, #0f1f3d 0%, #1a3460 35%, #234a7a 70%, #2c5f8d 100%);
}

.day-banner--final::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

.day-banner--final::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15,31,61,0.45) 100%);
    pointer-events: none;
}

.day-banner--finalists {
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.2);
    background:
        radial-gradient(circle at 80% 30%, rgba(96,165,250,0.25) 0%, transparent 50%),
        linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 40%, #2563eb 75%, #3b82f6 100%);
    min-height: 120px;
}
.day-banner--finalists::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}
.day-banner--finalists::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15,23,42,0.3) 100%);
    pointer-events: none;
}

.day-banner--waitlist {
    box-shadow: 0 8px 24px rgba(120, 80, 10, 0.18);
    background:
        radial-gradient(circle at 80% 30%, rgba(251,191,36,0.2) 0%, transparent 50%),
        linear-gradient(135deg, #78350f 0%, #92400e 40%, #b45309 75%, #d97706 100%);
    min-height: 120px;
}
.day-banner--waitlist::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}
.day-banner--waitlist::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(60,30,5,0.3) 100%);
    pointer-events: none;
}

.day-banner--rating {
    box-shadow: 0 8px 24px rgba(88, 28, 135, 0.18);
    background:
        radial-gradient(circle at 80% 30%, rgba(192,132,252,0.2) 0%, transparent 50%),
        linear-gradient(135deg, #581c87 0%, #6b21a8 40%, #7c3aed 75%, #8b5cf6 100%);
    min-height: 120px;
}
.day-banner--rating::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}
.day-banner--rating::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(40,10,70,0.3) 100%);
    pointer-events: none;
}

.day-banner:hover {
    transform: none;
}

.day-banner--qualifier:hover {
    box-shadow: 0 18px 42px rgba(36, 80, 150, 0.32);
}

.day-banner--finalists:hover {
    box-shadow: 0 14px 36px rgba(30, 58, 138, 0.32);
}

.day-banner--waitlist:hover {
    box-shadow: 0 14px 36px rgba(120, 80, 10, 0.28);
}

.day-banner--rating:hover {
    box-shadow: 0 14px 36px rgba(88, 28, 135, 0.28);
}

.day-banner--final:hover {
    box-shadow: 0 18px 42px rgba(18, 40, 80, 0.4);
}

.day-banner__content {
    position: relative;
    z-index: 2;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
}

.day-banner__badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.92);
    margin-bottom: auto;
}

.day-banner__title {
    margin: 16px 0 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.day-banner__info {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    line-height: 1.4;
}

@media (max-width: 640px) {
    .day-banner {
        min-height: 170px;
    }

    .day-banner__content {
        padding: 20px 22px;
    }

    .day-banner__title {
        font-size: 18px;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* ============================================
   ACTION BUTTONS & LINKS
   ============================================ */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 28px 0 18px;
}

.action-buttons form {
    margin: 0;
}

.secondary-links {
    text-align: center;
    margin-top: 26px;
    color: var(--text-muted);
    font-size: 14px;
}

.secondary-links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.secondary-links a:hover {
    text-decoration: underline;
}

/* ============================================
   MUTED BOX
   ============================================ */
.muted-box {
    padding: 18px;
    border-radius: 20px;
    background: #f6f8fb;
    border: 1px solid rgba(72, 138, 198, 0.12);
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.muted-box a,
.muted-box a:hover,
.muted-box a:focus {
    text-decoration: none;
    color: var(--primary-dark);
}

/* ============================================
   INFO GRID
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.info-item {
    padding: 18px;
    border-radius: 18px;
    background: rgba(72, 138, 198, 0.08);
    font-size: 15px;
    line-height: 1.5;
}

.info-item strong {
    color: var(--text-main);
}

/* ============================================
   FOOTER
   ============================================ */
.page-footer {
    text-align: center;
    margin-top: 36px;
    color: rgba(16, 36, 63, 0.55);
    font-size: 13px;
}

/* Ссылки подвала (_site_footer.html) — в строку, без разделителей */
.page-footer__links {
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-blue { background: rgba(72, 138, 198, 0.18); color: #1c4e88; }
.badge-green { background: rgba(76, 175, 80, 0.18); color: #2f7c32; }
.badge-red { background: rgba(244, 67, 54, 0.16); color: #b71c1c; }
.badge-orange { background: rgba(255, 152, 0, 0.16); color: #a35a02; }
.badge-purple { background: rgba(156, 39, 176, 0.16); color: #6a1b9a; }
.badge-yellow { background: rgba(255, 214, 0, 0.22); color: #a98500; }
.badge-gray { background: rgba(120, 144, 156, 0.16); color: #455a64; }

.status-open {
    background: rgba(76, 175, 80, 0.15);
    color: #1b5e20;
}

.status-waitlist {
    background: rgba(255, 193, 7, 0.16);
    color: #8a5a00;
}

.status-closed {
    background: rgba(244, 67, 54, 0.14);
    color: #7f1d1d;
}

.status-soon {
    background: rgba(99, 102, 241, 0.14);
    color: #3730a3;
}

/* ============================================
   SUMMARY SECTION
   ============================================ */
.summary-section {
    margin-bottom: 32px;
}

.summary-section h2 {
    margin: 0 0 18px;
    font-size: 22px;
    color: var(--primary-dark);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.summary-item {
    background: var(--surface);
    border: 1px solid rgba(72, 138, 198, 0.16);
    border-radius: 20px;
    padding: 18px 30px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(36, 73, 128, 0.08);
}

.summary-item__label {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.summary-item__value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.5;
}

.summary-item__value a {
    color: inherit;
    text-decoration: none;
}

.summary-item__value a:hover {
    text-decoration: underline;
}

.summary-item__note {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.summary-section__title {
    display: block;
    padding-left: 30px;
    margin-bottom: 14px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.open-days-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 700px) {
    .open-days-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   CONFIRMATION SECTION
   ============================================ */
.confirmation-header {
    background: var(--surface);
    padding: 28px;
    border-radius: 22px;
    margin-bottom: 28px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary);
}

.confirmation-header h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 700;
}

.confirmation-header p {
    margin: 10px 0 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

.confirmation-block {
    background: var(--surface);
    padding: 30px;
    border-radius: 22px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.confirmation-block h3 {
    margin: 0 0 20px 0;
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 700;
}

.confirmation-item {
    margin-bottom: 16px;
    line-height: 1.6;
}

.confirmation-item:last-child {
    margin-bottom: 0;
}

.confirmation-item strong {
    display: block;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.confirmation-item > div {
    color: var(--text-main);
    font-size: 15px;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-back {
    background: rgba(72, 138, 198, 0.12);
    color: var(--primary-dark);
    flex: 1;
    border-radius: 999px;
    padding: 14px 28px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-back:hover {
    background: rgba(72, 138, 198, 0.2);
}

.btn-confirm {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(5, 150, 105, 0.26);
    flex: 2;
    border-radius: 999px;
    padding: 14px 28px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-confirm:hover {
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.3);
}

.confirmation-note {
    background: #f6f9fc;
    border: 1px solid rgba(72, 138, 198, 0.2);
    color: var(--text-main);
    padding: 16px 30px;
    border-radius: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.65;
    box-shadow: 0 8px 20px rgba(36, 73, 128, 0.08);
}

.confirmation-note p:first-child {
    margin-top: 0;
}

.confirmation-note p:last-child {
    margin-bottom: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .page {
        padding: 16px 12px 60px;
    }

    .hero-card {
        padding: 44px 24px;
        border-radius: 26px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .content-card,
    .form-section {
        padding: 26px 20px;
    }

    .content-card {
        border-radius: 24px;
    }

    .instruction-box {
        padding: 14px 20px;
        margin-bottom: 20px;
        font-size: 14px;
    }

    .instruction-box-in-form {
        padding: 12px 20px;
        font-size: 14px;
    }

    .warning-block {
        padding: 14px 20px;
        margin-bottom: 20px;
        font-size: 14px;
    }

    .warning-block > strong {
        font-size: 1em;
    }

    .section-header {
        padding: 0 20px;
    }

    .summary-section {
        margin-bottom: 20px;
    }

    .summary-grid {
        gap: 14px;
    }

    .summary-item {
        padding: 18px 20px;
    }

    .summary-section__title {
        padding-left: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    label {
        font-size: 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
        padding: 9px;
        font-size: 15px;
    }

    .help-text {
        font-size: 13px;
    }

    button {
        padding: 11px 22px;
        font-size: 15px;
    }

    .player-form {
        padding: 26px 20px;
        margin: 10px 0;
    }

    .player-form h3 {
        font-size: 17px;
    }

    .instruction-text {
        font-size: 14px;
    }

    .consent-checkbox,
    .checkbox-single {
        padding: 12px;
        gap: 10px;
    }

    .consent-checkbox input[type="checkbox"],
    .checkbox-single input[type="checkbox"] {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
    }

    .consent-checkbox label,
    .checkbox-single label {
        font-size: 14px;
    }

    .section-deadline {
        font-size: 13px;
    }

    .confirmation-header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .confirmation-header h2 {
        font-size: 20px;
    }

    .confirmation-header p {
        font-size: 14px;
    }

    .confirmation-block {
        padding: 20px;
        margin-bottom: 20px;
    }

    .confirmation-block h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .confirmation-item {
        margin-bottom: 14px;
    }

    .confirmation-item strong {
        font-size: 13px;
    }

    .confirmation-item > div {
        font-size: 14px;
    }

    .player-list li {
        padding: 0;
        font-size: 14px;
    }

    .confirmation-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-back, .btn-confirm {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }

    .confirmation-note {
        font-size: 13px;
        padding: 12px 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .page-footer {
        font-size: 12px;
        padding: 0 12px;
    }

    .event-card__body {
        padding: 24px 22px 26px;
    }

    .event-card__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================
   AUTH LINKS BLOCK (для страниц логина/регистрации)
   ============================================ */
.auth-links-block {
    text-align: center;
    padding: 20px 30px;
}

.auth-links-block p {
    margin: 0 0 8px 0;
}

.auth-links-block p:last-child {
    margin: 0;
}

@media (max-width: 520px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}