:root {
    --bg: #0b0d12;
    --bg-alt: #12151c;
    --surface: #181c26;
    --surface-2: #1f2430;
    --text: #eef1f5;
    --text-muted: #97a0b0;
    --accent: #f2a93b;
    --accent-dark: #c98620;
    --live: #ef4444;
    --ok: #22c55e;
    --border: #262b38;
    --radius: 14px;
    font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header / nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 18, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--accent);
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

/* animated icons: subtle idle motion, livelier on hover */
.nav-icon--menu svg path {
    transform-origin: center;
    animation: sway 3.2s ease-in-out infinite;
}
.nav-item:hover .nav-icon--menu svg path { animation-duration: 1s; }

.nav-icon--tv .tv-dot {
    fill: var(--accent);
    stroke: none;
    animation: blink 2.4s ease-in-out infinite;
}

.nav-icon--cup svg {
    transform-origin: 50% 90%;
    animation: tilt 3.6s ease-in-out infinite;
}
.nav-item:hover .nav-icon--cup svg { animation-duration: 0.8s; }

.nav-icon--anchor svg {
    transform-origin: 50% 20%;
    animation: rock 4s ease-in-out infinite;
}

.nav-icon--tag svg {
    animation: pop 2.8s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-6deg); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}
@keyframes tilt {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(8deg); }
}
@keyframes rock {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-4deg); }
}
@keyframes pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    background: var(--bg-alt);
    padding: 56px 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 13, 18, 0.92) 0%, rgba(11, 13, 18, 0.75) 55%, rgba(11, 13, 18, 0.55) 100%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-eyebrow {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin: 0 0 8px;
}

.hero-text h1 {
    font-size: 2.6rem;
    margin: 0 0 12px;
}

.hero-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 42ch;
}

.hero-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 220px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--live);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--live);
    animation: blink 1.4s ease-in-out infinite;
}

.live-widget-frame {
    width: 100%;
    height: 360px;
    border: 0;
    border-radius: 10px;
    background: var(--bg);
}

.hero-widget-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 220px;
    color: var(--text-muted);
    text-align: center;
}

.hero-widget-empty-icon { font-size: 2rem; }

.hero-info-stack { display: flex; flex-direction: column; gap: 14px; }

.hero-info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.hero-info-label {
    margin: 0 0 10px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    font-weight: 700;
}

.hero-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-team { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hero-score { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.hero-vs { color: var(--text-muted); }

.hero-info-sub {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.hero-info-sub strong { color: var(--text); }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }

.section-title {
    font-size: 1.8rem;
    margin: 0 0 28px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 2px;
}

.empty-note { color: var(--text-muted); }

/* ---------- Taps block ---------- */

.taps-block { margin-bottom: 40px; }

.taps-title {
    font-size: 1.1rem;
    color: var(--accent);
    margin: 0 0 16px;
}

.taps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.tap-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tap-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.tap-glass { position: relative; width: 42px; flex-shrink: 0; }

.tap-glass-svg { width: 42px; height: 56px; overflow: visible; }

.tap-glass-outline {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
}

.tap-liquid {
    fill: var(--accent);
    animation: pour 3.5s ease-in-out infinite;
}

.tap-foam {
    fill: #fff7e8;
    opacity: 0.85;
}

@keyframes pour {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.tap-number {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    background: var(--accent);
    color: #1a1305;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
}

.tap-info { display: flex; flex-direction: column; gap: 2px; }
.tap-name { font-weight: 700; }
.tap-desc { font-size: 0.82rem; color: var(--text-muted); }
.tap-price { color: var(--accent); font-weight: 700; margin-top: 4px; }

/* ---------- Menu tabs ---------- */

.menu-tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.menu-tab-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.menu-tab-btn.is-active,
.menu-tab-btn:hover {
    background: var(--accent);
    color: #1a1305;
    border-color: var(--accent);
}

.menu-tab-panel { display: none; }
.menu-tab-panel.is-active { display: block; }

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

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}

.menu-item-main { display: flex; flex-direction: column; gap: 2px; }
.menu-item-name { font-weight: 600; }
.menu-item-desc { font-size: 0.85rem; color: var(--text-muted); }
.menu-item-price { color: var(--accent); font-weight: 700; white-space: nowrap; }

.tap-flag {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.65rem;
    background: var(--surface-2);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 8px;
    vertical-align: middle;
}

/* ---------- Broadcasts ---------- */

:root {
    --sport-hockey: #38bdf8;
    --sport-football: #4ade80;
    --sport-basketball: #fb923c;
    --sport-other: var(--accent);
}

.broadcasts-tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.sport-tab-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.sport-tab-btn.is-active,
.sport-tab-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.sport-tab-btn--hockey.is-active { border-color: var(--sport-hockey); color: var(--sport-hockey); }
.sport-tab-btn--football.is-active { border-color: var(--sport-football); color: var(--sport-football); }
.sport-tab-btn--basketball.is-active { border-color: var(--sport-basketball); color: var(--sport-basketball); }

.broadcasts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.broadcast-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--sport-other);
    border-radius: 10px;
    padding: 12px 16px;
    flex-wrap: wrap;
}
.broadcast-item--hockey { border-left-color: var(--sport-hockey); }
.broadcast-item--football { border-left-color: var(--sport-football); }
.broadcast-item--basketball { border-left-color: var(--sport-basketball); }

.sport-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.sport-chip--hockey { box-shadow: inset 0 0 0 2px var(--sport-hockey); }
.sport-chip--football { box-shadow: inset 0 0 0 2px var(--sport-football); }
.sport-chip--basketball { box-shadow: inset 0 0 0 2px var(--sport-basketball); }
.sport-chip--other { box-shadow: inset 0 0 0 2px var(--sport-other); }

.team-logo { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }

.team-badge-wrap { display: inline-flex; }

.pirate-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    -webkit-mask-image: url('/img/logo-cutout.png');
    mask-image: url('/img/logo-cutout.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.broadcast-time { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.broadcast-date { font-size: 0.75rem; color: var(--text-muted); }
.broadcast-hour { font-weight: 700; }

.broadcast-teams-logos { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; }
.broadcast-info { display: flex; flex-direction: column; gap: 2px; }
.broadcast-teams { font-weight: 600; }
.broadcast-league { font-size: 0.8rem; color: var(--text-muted); }

.broadcast-featured { color: var(--accent); font-size: 0.8rem; font-weight: 700; }

/* ---------- Results window ---------- */

.results-window { margin-top: 36px; }
.results-title { font-size: 1.1rem; color: var(--accent); margin: 0 0 14px; }

.results-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.result-card {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--sport-other);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 260px;
    font-size: 0.85rem;
}
.result-card--hockey { border-top-color: var(--sport-hockey); }
.result-card--football { border-top-color: var(--sport-football); }
.result-card--basketball { border-top-color: var(--sport-basketball); }

.result-team { display: flex; align-items: center; gap: 6px; }
.result-score { font-weight: 800; font-size: 1rem; color: var(--accent); text-align: center; }
.result-date { grid-column: 1 / -1; color: var(--text-muted); font-size: 0.72rem; text-align: right; }

/* ---------- Tournaments / signup ---------- */

.tournaments-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }

.tournament-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}

.tournament-title { font-weight: 700; }
.tournament-date { color: var(--accent); margin-left: 10px; font-size: 0.85rem; }
.tournament-desc { color: var(--text-muted); margin: 6px 0 0; font-size: 0.9rem; }

.signup-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.signup-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.signup-form .full-width { grid-column: 1 / -1; }

.signup-form input,
.signup-form select,
.signup-form textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
}

.btn-primary {
    grid-column: 1 / -1;
    justify-self: start;
    background: var(--accent);
    color: #1a1305;
    border: none;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); }

.form-message { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.9rem; }
.form-message--success { background: rgba(34, 197, 94, 0.15); color: var(--ok); }
.form-message--error { background: rgba(239, 68, 68, 0.15); color: var(--live); }

/* ---------- About / gallery / reviews ---------- */

.about-text { color: var(--text-muted); max-width: 70ch; margin-bottom: 28px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 40px;
}

.gallery-item { border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item--video video { width: 100%; height: 100%; object-fit: cover; }

.reviews-title { font-size: 1.1rem; margin: 0 0 14px; color: var(--accent); }

.yandex-reviews-frame {
    width: 100%;
    height: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ---------- Promotions ---------- */

.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.promo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.promo-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.promo-card img { width: 100%; height: 140px; object-fit: cover; }
.promo-card-body { padding: 16px; }
.promo-card-body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.promo-card-body p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; }
    .signup-form { grid-template-columns: 1fr; }
    .nav-item span:last-child { display: none; }
    .nav-item { padding: 8px; }
}

/* ---------- Admin (shared minimal styling) ---------- */

.admin-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.admin-nav a {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.admin-nav a:hover { color: var(--text); border-color: var(--accent); }

.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.admin-form { display: grid; gap: 14px; max-width: 560px; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.admin-form input, .admin-form select, .admin-form textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
}
.admin-form .checkbox-row { flex-direction: row; align-items: center; gap: 8px; }

.btn-small {
    display: inline-block;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
}
.btn-small:hover { border-color: var(--accent); }
.btn-danger { color: var(--live); }
