/* Football theme layer: loaded after style.css. Palette variables live in style.css :root */
:root {
    --leather: #8a4b24;
    --chalk: #ffffff;
    --radius: 16px;
    --shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Nunito', 'Inter', system-ui, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    /* mowed-turf stripes */
    background-image: repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.025) 0 80px,
            rgba(0, 0, 0, 0.04) 80px 160px);
    background-attachment: fixed;
}

h1, h2, h3, h4, .navbar-brand, .btn, .status-badge {
    font-family: 'Bungee', 'Nunito', system-ui, sans-serif;
    letter-spacing: 0.02em;
}

h1, h2 { color: var(--chalk); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3, h4 { color: var(--primary-color); }
a { color: var(--primary-color); }
a:hover { color: #ffe08a; }

/* ---------- Navbar: scoreboard + sideline ---------- */
.navbar {
    background: #06210f;
    border-bottom: 4px solid var(--chalk);
    box-shadow: 0 4px 0 var(--primary-color);
    margin-bottom: 4px;
}

.navbar-brand {
    color: var(--chalk);
    font-size: 1.25rem;
    letter-spacing: 0.04em;
}

.navbar-brand span { display: inline-block; transition: transform 0.4s; }
.navbar-brand:hover span { transform: rotate(360deg) scale(1.15); }

.nav-item {
    color: var(--text-color);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.12); color: var(--chalk); }
.nav-item.active-link { background: var(--primary-color); color: #06210f; }
.nav-welcome { color: var(--muted); }
.admin-item { border: 2px dashed var(--primary-color); color: var(--primary-color); }
.logout-btn { color: var(--danger-soft); }
.menu-toggle span { background-color: var(--chalk); }

@media (max-width: 768px) {
    .nav-links { background: #06210f; border-bottom: 4px solid var(--primary-color); }
    .admin-links { background: rgba(255, 255, 255, 0.06); }
}

/* ---------- Cards ---------- */
.auth-card, .game-card, .participants-section, .card, .league-card, .panel {
    background: var(--card-bg);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.game-card { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.game-card:hover {
    transform: translateY(-4px) rotate(-0.3deg);
    border-color: var(--primary-color);
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25);
}

/* ---------- Buttons: chunky pills ---------- */
.btn {
    background: var(--primary-color);
    color: #06210f;
    border-radius: 999px;
    border: 0;
    box-shadow: 0 4px 0 #b88a10;
    padding: 10px 22px;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover { opacity: 1; filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b88a10; }
.btn:disabled { opacity: 0.6; box-shadow: none; }
.btn-small { padding: 5px 14px; }

/* ---------- Forms ---------- */
.form-control, select, input[type=text], input[type=password], input[type=number],
input[type=tel], input[type=datetime-local], textarea {
    background: #082616;
    color: var(--chalk);
    border: 2px solid var(--line-2);
    border-radius: 12px;
}

.form-control:focus, select:focus, input:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: 3px solid rgba(255, 201, 60, 0.45);
    outline-offset: 1px;
}

/* ---------- Status badges: like jersey patches ---------- */
.status-badge { border-radius: 999px; font-size: 0.65rem; padding: 5px 12px; }

/* ---------- Pool grid ---------- */
.squares-grid { gap: 3px; }
.grid-cell { border-radius: 8px; background: var(--card-bg-2); border: 1px solid var(--line); }
.vertical-text-cell, .horizontal-text-cell {
    background: var(--leather);
    color: var(--chalk);
    border-radius: 8px;
}

/* ---------- Tables ---------- */
table { border-radius: 12px; }
th { color: var(--primary-color); }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; border-width: 2px; font-weight: 700; }

/* ---------- Footer: end zone ---------- */
.site-footer {
    margin-top: 40px;
    padding: 18px;
    text-align: center;
    color: var(--muted);
    border-top: 4px dashed var(--line-2);
    background: #06210f;
}

.site-footer::before { content: "🏈 "; }

/* ---------- Page header yard-line accent ---------- */
main > h1:first-child, main > h2:first-child, .container > h1:first-child {
    display: inline-block;
    border-bottom: 5px solid var(--primary-color);
    padding-bottom: 4px;
}

/* ---------- Keep it calm for users who prefer less motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .game-card:hover { transform: none; }
}

/* ---------- Layout: pin footer to the bottom ---------- */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
.site-footer { margin-top: auto; }
form .btn { margin-top: 8px; }

/* ---------- Bootstrap utilities mapped onto the turf palette ---------- */
.bg-dark, .card, .card-header, .card-body { background-color: var(--card-bg) !important; color: var(--text-color); }
.card { border: 2px solid var(--line) !important; border-radius: var(--radius) !important; }
.card-header { background-color: var(--leather) !important; color: var(--chalk) !important; font-weight: 800; }
.text-success { color: var(--primary-color) !important; }
.text-muted, .text-secondary { color: var(--muted) !important; }
.border-secondary { border-color: var(--line-2) !important; }
.badge.bg-secondary { background-color: var(--leather) !important; }

/* ---------- Page-level buttons that bypass .btn ---------- */
body .button, body .btn-danger, body .btn-action, body .btn-reserve, body .btn-view, body .cta-btn {
    border-radius: 999px;
    font-family: 'Bungee', 'Nunito', sans-serif;
    letter-spacing: 0.02em;
}
body .btn-danger, body .button[style*="d9534f"] { background: #e0533f !important; color: #fff !important; border: 0; box-shadow: 0 4px 0 #8f2d20; }
body .alert-info { background: #0f5c6e !important; border-color: #1aa0b8 !important; color: #e6fbff !important; }
body .alert-warning { background: #6b4e0a !important; border-color: var(--primary-color) !important; color: #fff3cf !important; }
body .alert-success { background: #14663a !important; border-color: #2fbf71 !important; color: #eafff2 !important; }
body .alert-danger { background: #7a2418 !important; border-color: #e0533f !important; color: #ffeceb !important; }
details > summary { cursor: pointer; font-weight: 700; }

@media (min-width: 769px) { .nav-item, .nav-welcome { white-space: nowrap; } .nav-links { gap: 12px; flex-wrap: wrap; justify-content: flex-end; } }

.theme-picker { margin-top: 6px; font-size: 0.85rem; display: flex; gap: 12px; justify-content: center; align-items: center; }
.theme-picker a { color: inherit; opacity: .75; text-decoration: none; padding: 2px 8px; border-radius: 999px; }
.theme-picker a:hover, .theme-picker a:focus-visible { opacity: 1; text-decoration: underline; }
.theme-picker a.active { opacity: 1; font-weight: 800; border: 1px solid currentColor; }

.footer-help { color: inherit; margin-left: 12px; text-decoration: underline; }
