/* ========== ПЕРЕМЕННЫЕ И БАЗА ========== */
:root {
    --black: #0a0a0a;
    --black-soft: #111111;
    --black-card: rgba(22, 22, 22, 0.85);
    --gold: #d4af37;
    --gold-soft: #b8942e;
    --gold-light: #f0d97a;
    --gold-glow: rgba(212, 175, 55, 0.25);
    --text: #e8e8e8;
    --text-muted: #9a9a9a;
    --border: rgba(212, 175, 55, 0.15);
}

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

body {
    background-color: var(--black);
    background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%), linear-gradient(180deg, var(--black-soft) 0%, var(--black) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Золотой скроллбар */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #b8942e, #d4af37); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #f0d97a; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ========== ШАПКА ========== */
.site-header {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    position: sticky; top: 0; z-index: 100;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; flex-wrap: wrap; gap: 15px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 44px; width: auto; filter: drop-shadow(0 0 8px var(--gold-glow)); }
.logo-text { font-family: 'Bodoni Moda', serif; font-size: 24px; font-weight: bold; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; text-shadow: 0 0 15px var(--gold-glow); }

.main-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.main-nav a { color: var(--text); text-decoration: none; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; padding: 8px 0; position: relative; transition: color 0.3s; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--gold); transition: width 0.3s; }
.main-nav a:hover { color: var(--gold-light); }
.main-nav a:hover::after { width: 100%; }

/* ========== ЗАГОЛОВКИ ========== */
h1 { font-family: 'Bodoni Moda', serif; color: var(--gold-light); font-size: 38px; font-weight: normal; letter-spacing: 1px; margin: 40px 0 30px; padding-bottom: 16px; border-bottom: 1px solid var(--border); position: relative; }
h1::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 80px; height: 2px; background: var(--gold); }
h2 { font-family: 'Bodoni Moda', serif; color: var(--gold); font-size: 26px; font-weight: normal; letter-spacing: 1px; margin: 40px 0 20px; }

/* ========== HERO SECTION (С ФОНОМ ЛЬВА) ========== */
.hero-section {
    background: 
        linear-gradient(90deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.7) 50%, rgba(10, 10, 10, 0.1) 100%),
        url('/static/img/lion-bg.jpg') right center / cover no-repeat !important;
    border: 1px solid var(--gold) !important;
    border-radius: 12px;
    padding: 80px 40px;
    margin: 20px 0 50px;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    min-height: 350px;
}

.hero-title { font-family: 'Bodoni Moda', serif; font-size: 48px; color: var(--gold-light); border: none; margin: 0 0 20px 0; padding: 0; text-shadow: 0 4px 15px rgba(0,0,0,0.8); line-height: 1.2; }
.hero-title::after { display: none; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 0 40px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }

/* ========== КАРТОЧКИ ТУРНИРОВ (С ФОНОМ ЛЬВА) ========== */
.card {
    background: var(--black-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold-soft);
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px var(--gold-glow); border-color: var(--gold); }
.card h3 { color: var(--gold-light); font-size: 20px; margin-bottom: 8px; font-weight: normal; }

.tournament-card {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px;
    flex-wrap: wrap;
    background: 
        linear-gradient(90deg, rgba(22, 22, 22, 0.98) 0%, rgba(22, 22, 22, 0.9) 60%, rgba(22, 22, 22, 0.6) 100%),
        url('/static/img/lion-bg.jpg') right center / cover no-repeat !important;
    border-right: 1px solid var(--gold-soft) !important;
}

.tournament-info { flex: 1; min-width: 0; }
.tournament-buttons { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; margin-left: auto; }

/* Бейджи статуса */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.status-announced { background: rgba(212, 175, 55, 0.15); color: var(--gold-light); border: 1px solid var(--gold); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
.status-ongoing { background: rgba(255, 0, 0, 0.15); color: #ff4d4d; border: 1px solid #ff4d4d; box-shadow: 0 0 10px rgba(255, 0, 0, 0.2); animation: pulse-red 2s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); } 70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } }

/* ========== ТАБЛИЦЫ ========== */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--black-card); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 20px 0; }
th { background: rgba(212, 175, 55, 0.1); color: var(--gold); padding: 16px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; font-weight: normal; border-bottom: 1px solid var(--border); }
td { padding: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); transition: background 0.2s; }
tr:last-child td { border-bottom: none; }
table tbody tr:nth-child(1) td { background: rgba(212, 175, 55, 0.08); }
table tbody tr:nth-child(2) td { background: rgba(192, 192, 192, 0.06); }
table tbody tr:nth-child(3) td { background: rgba(205, 127, 50, 0.06); }
table tbody tr:hover td { background: rgba(212, 175, 55, 0.12); }

/* ========== ССЫЛКИ И КНОПКИ ========== */
a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }
.btn-signup { display: inline-block; padding: 10px 22px; background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%); color: var(--black) !important; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none !important; border: none; border-radius: 4px; box-shadow: 0 4px 15px var(--gold-glow); transition: all 0.3s; white-space: nowrap; cursor: pointer; }
.btn-signup:hover { box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5); transform: translateY(-1px); background: linear-gradient(180deg, #fff2a8 0%, var(--gold-light) 100%); }
.btn-signup.vk { background: linear-gradient(180deg, #5b8fd1 0%, #4a7ab8 100%); color: #fff !important; box-shadow: 0 4px 15px rgba(91, 143, 209, 0.3); }
.btn-signup.tg { background: linear-gradient(180deg, #4fb8e0 0%, #2a9dd0 100%); color: #fff !important; box-shadow: 0 4px 15px rgba(79, 184, 224, 0.3); }

/* ========== БЛОК КОНТАКТОВ ========== */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 20px; }
.contact-card { background: var(--black-card); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 8px; padding: 30px 20px; text-align: center; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; }
.contact-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px var(--gold-glow); border-color: var(--gold); }
.contact-icon { font-size: 32px; margin-bottom: 15px; filter: drop-shadow(0 0 10px var(--gold-glow)); }
.contact-card h3 { color: var(--gold); font-family: 'Bodoni Moda', serif; font-size: 20px; margin-bottom: 10px; font-weight: normal; letter-spacing: 1px; }
.contact-card p, .contact-card a { color: var(--text); font-size: 16px; text-decoration: none; }
.contact-card a:hover { color: var(--gold-light); }

/* ========== ФУТЕР ========== */
.site-footer { background: rgba(5, 5, 5, 0.9); border-top: 1px solid var(--border); padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 60px; }
.site-footer .muted { color: #555; font-size: 11px; margin-top: 10px; }
.admin-link { margin-top: 15px; font-size: 11px; }
.admin-link a { color: #444; text-transform: uppercase; letter-spacing: 1px; }
.admin-link a:hover { color: var(--gold); }

/* ========== УТИЛИТЫ И АНИМАЦИИ ========== */
.muted { color: var(--text-muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); font-style: italic; background: rgba(255,255,255,0.02); border-radius: 8px; border: 1px dashed var(--border); }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    h1 { font-size: 28px; }
    .header-inner { flex-direction: column; gap: 10px; }
    .main-nav { justify-content: center; gap: 10px; font-size: 11px; }
    .container { padding: 0 16px; }
    th, td { padding: 12px 10px; font-size: 13px; }
    
    .hero-section { padding: 50px 20px; background-position: center top; background: linear-gradient(180deg, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0.95) 100%), url('/static/img/lion-bg.jpg') center top / cover no-repeat !important; }
    .hero-title { font-size: 32px; }
    
    .tournament-card { flex-direction: column; align-items: stretch !important; }
    .tournament-buttons { margin-left: 0; margin-top: 15px; flex-direction: row; }
}
