/* ── East Coast Fast-Pitch — Patriotic Theme CSS ─────────────────── */

:root {
    --primary: #002868;
    --primary-light: #0A3A7A;
    --primary-dark: #001B45;
    --red: #BF0A30;
    --red-dark: #9A0826;
    --white: #FFFFFF;
    --dark: #0A1628;
    --darker: #060E1A;
    --surface: #0F2240;
    --card-bg: #152D50;
    --text: #F0F4FA;
    --text-dim: #8BA4C7;
    --accent: #DFFF00;
    --accent-dark: #B8D400;
    --gold: #D4A843;
    --green: #2ECC71;
    --orange: #E67E22;
    --border: #1E3D6B;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --transition: 0.2s ease;
    --nav-height: 56px;
    --bottom-nav-height: 64px;
}

/* ── Reset ─────────────────────────────────────────────────────── */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--darker);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: var(--nav-height);
    padding-bottom: var(--bottom-nav-height);
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Typography ────────────────────────────────────────────────── */

h1 { font-size: 2rem; font-weight: 800; line-height: 1.1; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

.section-title {
    margin-bottom: 1rem;
    color: var(--white);
}

.section-subtitle {
    color: var(--text-dim);
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Top Navigation ────────────────────────────────────────────── */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: linear-gradient(90deg, var(--dark) 0%, var(--primary-dark) 50%, var(--dark) 100%);
    border-bottom: 3px solid var(--red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 100;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-accent {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(223,255,0,0.4);
}

.nav-links {
    display: none;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: var(--primary);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav dropdown */
.nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--dark);
    border-bottom: 2px solid var(--red);
    padding: 0.5rem;
    box-shadow: var(--shadow);
}

/* ── Bottom Navigation (mobile) ────────────────────────────────── */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--dark);
    border-top: 3px solid var(--red);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-dim);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    min-width: 56px;
}

.bottom-link:hover,
.bottom-link.active {
    color: var(--accent);
}

.bottom-link svg {
    width: 22px;
    height: 22px;
}

/* ── Main Content ──────────────────────────────────────────────── */

.app-main {
    min-height: calc(100vh - var(--nav-height) - var(--bottom-nav-height));
}

.page {
    animation: fadeIn 0.2s ease;
}

.page.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    padding: 1.5rem 1rem;
}

.section-alt {
    background: var(--surface);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.breadcrumb-link {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 0.25rem;
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 40%, var(--primary-dark) 60%, var(--dark) 100%);
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--red);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(191,10,48,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0,40,104,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(223,255,0,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--white), var(--primary), var(--white), var(--red));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-sub {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Veteran Badge ────────────────────────────────────────────── */

.veteran-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(191,10,48,0.2), rgba(0,40,104,0.2));
    border: 1px solid var(--red);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.veteran-badge .flag-icon {
    font-size: 1rem;
}

.veteran-badge .star-icon {
    color: var(--gold);
}

/* ── Values Section ───────────────────────────────────────────── */

.values-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.value-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.value-card:hover {
    border-color: var(--red);
    transform: translateY(-2px);
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.value-card h3 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.value-card p {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ── Buttons ───────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--white);
    box-shadow: 0 0 12px rgba(0,40,104,0.4);
}

.btn-accent {
    background: var(--accent);
    color: var(--darker);
    font-weight: 700;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: var(--darker);
    box-shadow: 0 0 16px rgba(223,255,0,0.3);
}

.btn-red {
    background: var(--red);
    color: var(--white);
}

.btn-red:hover {
    background: var(--red-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--darker);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--red-dark);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
}

.btn-ghost:hover {
    color: var(--white);
    background: var(--surface);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Cards ─────────────────────────────────────────────────────── */

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--white);
    font-size: 1.05rem;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.card-body {
    font-size: 0.9rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* ── Tournament Cards ──────────────────────────────────────────── */

.tournament-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.tournament-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
}

.tournament-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(223,255,0,0.1), var(--shadow-lg);
}

.tournament-card-top {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.date-badge {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: var(--white);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.6rem;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

.date-badge-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.date-badge-day {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.tournament-card-info {
    flex: 1;
    min-width: 0;
}

.tournament-card-name {
    font-weight: 700;
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.tournament-card-venue {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
}

.tournament-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tournament-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    font-weight: 600;
}

.tag-division {
    background: rgba(0,40,104,0.3);
    color: #6B9FFF;
}

.tag-status {
    background: rgba(223,255,0,0.15);
    color: var(--accent);
}

.tag-fee {
    background: rgba(46,204,113,0.15);
    color: var(--green);
}

.tag-special {
    background: rgba(191,10,48,0.25);
    color: #FF6B7A;
}

.tournament-card-bottom {
    background: rgba(0,0,0,0.2);
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* ── Score Entry Cards ─────────────────────────────────────────── */

.score-cards-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

.score-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1rem;
    transition: all var(--transition);
}

.score-card.scored {
    border-color: var(--green);
    opacity: 0.8;
}

.score-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.score-card-game-type {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.score-card-teams {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-team-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.score-team-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    width: 40px;
    flex-shrink: 0;
}

.score-team-name {
    flex: 1;
    font-weight: 600;
    color: var(--white);
    font-size: 1rem;
}

.score-input {
    width: 64px;
    height: 48px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.score-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 8px rgba(223,255,0,0.2);
}

.score-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

/* ── Standings Tables ──────────────────────────────────────────── */

.standings-container {
    margin-top: 1.5rem;
}

.standings-section {
    margin-bottom: 1.5rem;
}

.standings-pool-name {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.standings-table th {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--red);
    white-space: nowrap;
}

.standings-table td {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(30,61,107,0.4);
    color: var(--text);
}

.standings-table tr:hover td {
    background: rgba(0,40,104,0.12);
}

.standings-table .team-name-col {
    font-weight: 600;
    color: var(--white);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.standings-table .num-col {
    text-align: center;
    min-width: 32px;
}

/* ── Bracket Visualization ─────────────────────────────────────── */

.bracket-container {
    overflow-x: auto;
    padding: 1rem 0;
}

.bracket-grid {
    display: flex;
    gap: 2rem;
    min-width: max-content;
    padding: 1rem;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    min-width: 200px;
}

.bracket-round-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 0.5rem;
}

.bracket-game {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.bracket-team {
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.bracket-team:last-child {
    border-bottom: none;
}

.bracket-team.winner {
    background: rgba(0,40,104,0.2);
    color: var(--white);
    font-weight: 600;
    border-left: 3px solid var(--accent);
}

.bracket-team-score {
    font-weight: 700;
    min-width: 24px;
    text-align: right;
}

/* ── Forms ─────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 6px rgba(223,255,0,0.15);
}

.form-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238BA4C7'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 24px;
    padding-right: 2rem;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.form-check label {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0;
}

.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-select,
.filter-bar .form-input {
    width: auto;
    min-width: 140px;
    flex: 1;
    max-width: 220px;
}

/* ── Auth Forms ────────────────────────────────────────────────── */

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--nav-height) - var(--bottom-nav-height));
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.auth-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ── Features Grid ─────────────────────────────────────────────── */

.features-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.feature-card {
    text-align: center;
    padding: 1.5rem 1rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ── Admin Nav Grid ────────────────────────────────────────────── */

.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.admin-nav-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
}

.admin-nav-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.admin-nav-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.admin-nav-card h3 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.admin-nav-card p {
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* ── Stats Grid ────────────────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ── Status Badges ─────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-draft { background: rgba(139,164,199,0.2); color: var(--text-dim); }
.badge-registration { background: rgba(46,204,113,0.2); color: var(--green); }
.badge-scheduled { background: rgba(223,255,0,0.15); color: var(--accent); }
.badge-in-progress { background: rgba(0,40,104,0.3); color: #6B9FFF; }
.badge-completed { background: rgba(139,164,199,0.15); color: var(--text-dim); }
.badge-pending { background: rgba(230,126,34,0.2); color: var(--orange); }
.badge-confirmed { background: rgba(46,204,113,0.2); color: var(--green); }
.badge-cancelled { background: rgba(191,10,48,0.2); color: #FF6B7A; }
.badge-paid { background: rgba(46,204,113,0.2); color: var(--green); }
.badge-unpaid { background: rgba(191,10,48,0.2); color: #FF6B7A; }

/* ── Toast Notifications ───────────────────────────────────────── */

#toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 0.5rem);
    right: 0.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
    width: calc(100% - 1rem);
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 3.7s;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-success { background: var(--green); color: var(--white); }
.toast-error { background: var(--red); color: var(--white); }
.toast-info { background: var(--primary); color: var(--white); }
.toast-warning { background: var(--orange); color: var(--white); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ── Modal ─────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-header h3 {
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--white);
}

/* ── Loading Spinner ───────────────────────────────────────────── */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,14,26,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 600;
    backdrop-filter: blur(2px);
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ── Empty State ───────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ── Schedule Grid ─────────────────────────────────────────────── */

.schedule-day {
    margin-bottom: 1.5rem;
}

.schedule-day-header {
    font-weight: 700;
    color: var(--accent);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--red);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.schedule-field-group {
    margin-bottom: 1rem;
}

.schedule-field-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.schedule-game {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-left: 3px solid var(--primary);
    margin-bottom: 0.35rem;
    background: rgba(21,45,80,0.5);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
}

.schedule-time {
    font-weight: 700;
    color: var(--accent);
    min-width: 55px;
    font-size: 0.8rem;
}

.schedule-matchup {
    flex: 1;
    color: var(--text);
}

.schedule-score {
    font-weight: 700;
    color: var(--accent);
    min-width: 50px;
    text-align: right;
}

/* ── Division Tabs ─────────────────────────────────────────────── */

.division-tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.division-tab {
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-dim);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.division-tab.active {
    background: var(--red);
    color: var(--white);
}

/* ── Sponsors Page (Public) ───────────────────────────────────── */

.sponsor-tier-section {
    margin-bottom: 2rem;
}

.sponsor-tier-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sponsor-tier-title.gold { color: var(--gold); border-bottom-color: var(--gold); }
.sponsor-tier-title.silver { color: #C0C0C0; border-bottom-color: #C0C0C0; }
.sponsor-tier-title.bronze { color: #CD7F32; border-bottom-color: #CD7F32; }

.sponsor-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.sponsor-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition);
}

.sponsor-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.sponsor-logo-placeholder {
    width: 100%;
    height: 80px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 2rem;
    color: var(--text-dim);
}

.sponsor-card h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.sponsor-card p {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ── Merch Store ──────────────────────────────────────────────── */

.merch-categories {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.merch-category-btn {
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.merch-category-btn.active {
    background: var(--accent);
    color: var(--darker);
    border-color: var(--accent);
}

.merch-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

.merch-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.merch-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.merch-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--surface), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-dim);
}

.merch-info {
    padding: 0.75rem;
}

.merch-name {
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.merch-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.merch-card .btn {
    width: 100%;
    font-size: 0.8rem;
}

.merch-team-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}

.merch-team-section h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.merch-team-section p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ── Follow / Subscribe Section ──────────────────────────────── */

.follow-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--surface));
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.follow-section h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.follow-section p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.follow-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

.follow-form .form-input,
.follow-form .form-select {
    text-align: center;
}

/* ── Newsletter Footer ───────────────────────────────────────── */

.newsletter-footer {
    background: var(--dark);
    border-top: 3px solid var(--red);
    padding: 2rem 1.5rem;
    text-align: center;
}

.newsletter-footer h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.newsletter-footer p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form .form-input {
    flex: 1;
}

.newsletter-footer .footer-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.newsletter-footer .footer-links {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    font-size: 0.8rem;
}

/* ── Patriotic Divider ────────────────────────────────────────── */

.patriotic-divider {
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--white), var(--primary), var(--white), var(--red));
    border: none;
    margin: 0;
}

/* ── Utility ───────────────────────────────────────────────────── */

.text-accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.hidden {
    display: none !important;
}

/* ── Responsive: Tablet (768px) ────────────────────────────────── */

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .section {
        padding: 2rem;
    }

    .tournament-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .score-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .admin-nav-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .standings-table {
        font-size: 0.85rem;
    }

    .merch-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .newsletter-form {
        flex-direction: row;
    }
}

/* ── Responsive: Desktop (1024px) ──────────────────────────────── */

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }

    .bottom-nav {
        display: none;
    }

    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .section {
        padding: 2rem 3rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .hero {
        padding: 5rem 3rem;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .tournament-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .score-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .auth-section {
        min-height: calc(100vh - var(--nav-height));
    }

    .merch-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .sponsor-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Photo Gallery ─────────────────────────────────────────────── */

.photo-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

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

.photo-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--card-bg);
    transition: transform 0.2s;
}

.photo-card:hover {
    transform: scale(1.02);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 30px 12px 10px;
    color: #fff;
}

.photo-card-title {
    font-weight: 600;
    font-size: 14px;
}

.photo-card-credit {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.photo-card-tournament {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}

.photo-admin-card {
    cursor: default;
}

.photo-admin-card:hover {
    transform: none;
}

.photo-admin-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.photo-admin-actions .btn {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    font-size: 12px;
    padding: 4px 8px;
}

/* ── Photo Lightbox ──────────────────────────────────────────── */

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox.hidden {
    display: none;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent);
}

.lightbox-info {
    text-align: center;
    color: #fff;
    margin-top: 12px;
}

.lightbox-title {
    font-size: 16px;
    font-weight: 600;
}

.lightbox-photographer {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
}

/* ── Print ─────────────────────────────────────────────────────── */

@media print {
    .top-nav, .bottom-nav, .btn, #toast-container, .modal-overlay, .loading-overlay, .newsletter-footer {
        display: none !important;
    }
    body {
        padding: 0;
        background: white;
        color: black;
    }
    .card, .tournament-card, .score-card {
        border: 1px solid #ccc;
        background: white;
    }
}
