:root {
    --bg: #0b0d11;
    --bg-2: #10151d;
    --panel: #11151c;
    --muted: #697386;
    --text: #f5f7fb;
    --text-dark: #151922;
    --gold: #f5c542;
    --gold-dark: #e5ad13;
    --soft: #f5f7fb;
    --soft-2: #eef1f6;
    --line: #e5e9f2;
    --danger: #ef4444;
    --success: #10b981;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-sm: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--soft);
    color: var(--text-dark);
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 9, 12, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-wrap {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.6rem;
    color: var(--white);
    font-weight: 800;
}

.brand-word {
    font-size: 1.22rem;
    letter-spacing: 0.03em;
}

.brand-word strong {
    color: var(--gold);
}

.brand-sub {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.86);
    padding: 0.8rem 0.95rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-button {
    background: var(--gold);
    color: #111 !important;
}

.nav-button.ghost {
    background: transparent;
    color: var(--white) !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.page-shell {
    min-height: calc(100vh - 220px);
}

.hero-section,
.page-hero,
.auth-surface {
    background:
        radial-gradient(circle at top left, rgba(245, 197, 66, 0.16), transparent 35%),
        linear-gradient(180deg, #0b0d11, #11151c);
    color: var(--white);
}

.hero-section {
    padding: 5rem 0 3.8rem;
}

.page-hero {
    padding: 3.2rem 0 2.2rem;
}

.page-hero.small {
    padding: 2.8rem 0 1.8rem;
}

.hero-grid,
.auth-grid,
.dashboard-grid,
.cards-grid,
.stats-grid,
.footer-grid,
.split-grid {
    display: grid;
    gap: 1.2rem;
}

.hero-grid,
.auth-grid,
.dashboard-grid,
.split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid.two,
.stats-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid.three,
.stats-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-grid.four,
.stats-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-section h1,
.page-hero h1,
.section-head h2,
.panel h2,
.auth-copy h1 {
    margin: 0.35rem 0 0.8rem;
    line-height: 1.04;
}

.hero-section h1,
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.hero-section h1 span,
.gold-text,
.section-head p,
.panel h3,
.footer-grid span {
    color: var(--gold);
}

.hero-section p,
.page-hero p,
.panel p,
.info-card p,
.rank-card p,
.site-footer p,
.auth-copy p,
.helper-text,
.contact-list p,
.story-box p {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gold);
}

.hero-actions,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.35rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gold);
    color: #111;
}

.btn-primary:hover {
    background: var(--gold-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.full-width {
    width: 100%;
}

.hero-card,
.panel,
.auth-card,
.info-card,
.rank-card,
.stat-card,
.player-edit-card,
.story-box,
.package-card-home {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.panel,
.auth-card,
.info-card,
.rank-card,
.player-edit-card,
.story-box,
.package-card-home {
    padding: 1.5rem;
}

.hero-card,
.dark-panel,
.contact-panel-dark,
.rules-panel {
    background: linear-gradient(180deg, #141922, #0d1117);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.flash-hero {
    position: relative;
}

.flash-hero-card h3,
.auth-copy-dark h1,
.dashboard-hero h1,
.leaderboard-hero h1 {
    color: var(--white);
}

.feature-strip {
    margin-top: -2rem;
}

.feature-card-home {
    text-align: center;
}

.feature-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.85rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(245, 197, 66, 0.14);
    font-size: 1.7rem;
}

.section-block {
    padding: 4.2rem 0;
}

.muted-section {
    background: var(--soft-2);
}

.section-head {
    margin-bottom: 1.6rem;
}

.center-head {
    text-align: center;
}

.section-head h2 {
    font-size: clamp(1.85rem, 3vw, 2.8rem);
}

.section-head.between {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.story-box {
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.15), #fff);
    margin-bottom: 1rem;
}

.story-box h3,
.panel h3,
.info-card h3,
.package-card-home h3,
.rank-card h3,
.auth-card h3 {
    margin-top: 0;
    margin-bottom: 0.7rem;
}

.about-grid,
.packages-grid-home,
.gallery-grid-home,
.benefit-grid,
.contact-grid-home {
    margin-top: 1.1rem;
}

.vision-panel {
    margin-top: 1.1rem;
}

.feature-list,
.footer-links,
.compact-list {
    list-style: none;
    padding: 0;
    margin: 0.95rem 0 0;
}

.feature-list li,
.footer-links li,
.compact-list li {
    padding: 0.48rem 0;
}

.feature-list li::before,
.compact-list li::before {
    content: '✓';
    color: var(--gold);
    font-weight: 900;
    margin-right: 0.65rem;
}

.package-card-home {
    position: relative;
    border: 1px solid var(--line);
}

.package-card-home .price {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.premium-package-home {
    background: linear-gradient(145deg, #11151c, #1b2330);
    color: var(--white);
    border: 1px solid rgba(245, 197, 66, 0.32);
}

.premium-package-home .price,
.premium-package-home h3 {
    color: var(--white);
}

.premium-tag {
    display: inline-flex;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(245, 197, 66, 0.16);
    color: var(--gold);
    font-weight: 800;
    font-size: 0.82rem;
    margin-bottom: 0.7rem;
}

.rank-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border: 1px solid #eceff4;
}

.rank-card.spotlight,
.top-card {
    border: 1px solid rgba(245, 197, 66, 0.34);
}

.rank-pill {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(245, 197, 66, 0.16);
    color: #8a6900;
    font-weight: 800;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-dark);
    font-weight: 700;
}

.gallery-grid-home {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.gallery-tile {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 230px;
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-tile:hover img {
    transform: scale(1.04);
}

.contact-list {
    display: grid;
    gap: 1rem;
}

.contact-list strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--gold);
}

.filter-bar,
.auth-form,
.admin-form {
    display: grid;
    gap: 0.9rem;
}

.filter-bar {
    grid-template-columns: 2fr 1fr auto;
    margin-bottom: 1.2rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    background: var(--white);
}

label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
}

.auth-section {
    padding: 4rem 0;
}

.auth-card {
    max-width: 560px;
}

.auth-form label {
    margin-bottom: -0.35rem;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.3rem 0;
    color: #6b7280;
}

.divider::before,
.divider::after {
    content: '';
    height: 1px;
    background: #e5e7eb;
    flex: 1;
}

.flash-message {
    margin: 1rem auto 0;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    font-weight: 600;
}

.flash-success {
    background: rgba(16, 185, 129, 0.12);
    color: #0f6b50;
}

.flash-error {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.text-link {
    font-weight: 700;
    color: #8a6900;
}

.table-shell {
    overflow-x: auto;
    margin-top: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eef1f6;
}

.data-table th {
    background: #f8fafc;
}

.stat-card {
    padding: 1.25rem;
    border: 1px solid #eceff4;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card span {
    color: #6b7280;
    font-weight: 600;
}

.stat-card strong {
    font-size: 1.9rem;
}

.detail-list {
    display: grid;
    gap: 0.85rem;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eef1f6;
}

.detail-list span {
    color: #6b7280;
}

.footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
}

.site-footer {
    background: #0b0d11;
    color: var(--white);
    padding: 3rem 0 1.2rem;
    margin-top: 3rem;
}

.footer-bottom {
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.form-grid-three,
.form-grid-five {
    display: grid;
    gap: 1rem;
}

.form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-table-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.player-edit-head,
.player-edit-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.player-edit-footer {
    margin-top: 1rem;
}

.contact-form-panel textarea {
    resize: vertical;
}

@media (max-width: 1080px) {
    .cards-grid.four,
    .gallery-grid-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .auth-grid,
    .dashboard-grid,
    .split-grid,
    .cards-grid.three,
    .stats-grid.three,
    .stats-grid.four,
    .footer-grid,
    .form-grid-five,
    .cards-grid.two,
    .form-grid-three,
    .filter-bar,
    .cards-grid.four {
        grid-template-columns: 1fr;
    }

    .section-head.between,
    .player-edit-head,
    .player-edit-footer,
    .detail-list div {
        display: grid;
        justify-content: initial;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + 0.75rem);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border-radius: 18px;
        background: rgba(11, 13, 17, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: var(--shadow);
        display: none;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        width: 100%;
    }

    .hero-section {
        padding-top: 3.6rem;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 1.2rem));
    }

    .gallery-grid-home {
        grid-template-columns: 1fr;
    }

    .hero-section,
    .section-block,
    .auth-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero-section h1,
    .page-hero h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }
}


.wrap { flex-wrap: wrap; }
.rules-grid .info-card,
.info-card.light {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.feature-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.65rem;
    color: var(--text-dark);
}

.compact-list { gap: 0.5rem; }
.compact-gap { gap: 0.7rem; }
.column-actions { flex-direction: column; align-items: flex-start; }
.mini-note, .status-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-badge.on {
    background: rgba(16, 185, 129, 0.16);
    color: #047857;
}

.status-badge.off {
    background: rgba(245, 197, 66, 0.18);
    color: #8a6500;
}

.form-grid-two,
.form-grid-three,
.form-grid-four,
.form-grid-five {
    display: grid;
    gap: 0.85rem;
}

.form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.inline-form,
.compact-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn.small {
    padding: 0.55rem 0.8rem;
    font-size: 0.88rem;
}

.wide-table th,
.wide-table td {
    white-space: nowrap;
}

@media (max-width: 980px) {
    .form-grid-five,
    .form-grid-four,
    .form-grid-three,
    .form-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .form-grid-five,
    .form-grid-four,
    .form-grid-three,
    .form-grid-two {
        grid-template-columns: 1fr;
    }
}
