/* ============================================
   Owen Youth Sports Flag Football - Main CSS
   Colors: Maroon #6B1D2D, Grey #8C8C8C, White
   Owen Warhorses - Maroon & Grey
   ============================================ */

/* ---------- Root Variables ---------- */
:root {
    --league-green: #6B1D2D;
    --league-green-light: #8B3A4A;
    --league-green-dark: #3D0F18;
    --league-gold: #8C8C8C;
    --league-gold-dark: #6B6B6B;
    --league-accent: #D4AF37;
    --league-white: #FFFFFF;
    --league-bg: #F5F5F5;
    --league-text: #212529;
    --league-muted: #6C757D;
    --league-shadow: 0 2px 12px rgba(0,0,0,.08);
    --league-radius: 12px;
}

/* ---------- Global ---------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--league-text);
    background: var(--league-bg);
}

h1, h2, h3, h4, h5, .brand-heading {
    font-family: 'Russo One', 'Inter', sans-serif;
}

a { color: var(--league-green); }
a:hover { color: var(--league-green-dark); }

.bg-league-dark { background: var(--league-green-dark) !important; }
.bg-league-green { background: var(--league-green) !important; }
.text-league-green { color: var(--league-green) !important; }
.text-league-gold { color: var(--league-accent, #D4AF37) !important; }
.border-league-gold { border-color: var(--league-accent, #D4AF37) !important; }

/* ---------- Buttons ---------- */
.btn-league-green {
    background: var(--league-green);
    border-color: var(--league-green);
    color: var(--league-white);
}
.btn-league-green:hover,
.btn-league-green:focus {
    background: var(--league-green-light);
    border-color: var(--league-green-light);
    color: var(--league-white);
}

.btn-league-gold {
    background: var(--league-accent, #D4AF37);
    border-color: var(--league-accent, #D4AF37);
    color: var(--league-green-dark);
    font-weight: 600;
}
.btn-league-gold:hover,
.btn-league-gold:focus {
    background: #C49B2F;
    border-color: #C49B2F;
    color: var(--league-green-dark);
}

.btn-outline-league {
    border-color: var(--league-green);
    color: var(--league-green);
}
.btn-outline-league:hover {
    background: var(--league-green);
    color: var(--league-white);
}

/* ---------- Navbar ---------- */
.navbar-league {
    background: var(--league-green) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.navbar-league .navbar-brand {
    font-family: 'Russo One', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.brand-text {
    line-height: 1.2;
}
@media (max-width: 575.98px) {
    .navbar-brand { font-size: .95rem !important; }
    .brand-text { font-size: .9rem; }
}
.navbar-league .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-family: 'Russo One', sans-serif;
    font-size: .85rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: .6rem 1rem;
    border-radius: 0;
    transition: all .2s;
}
.navbar-league .nav-link:hover {
    color: var(--league-white) !important;
    background: rgba(255,255,255,.1);
}
.navbar-league .nav-link.active {
    background: rgba(255,255,255,.15);
    color: var(--league-white) !important;
    border-bottom: 2px solid var(--league-accent, #D4AF37);
}

/* ---------- Hero ---------- */
.hero-section {
    background: linear-gradient(135deg, var(--league-green) 0%, var(--league-green-dark) 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30px; left: 0; right: 0;
    height: 60px;
    background: var(--league-bg);
    transform: skewY(-2deg);
}
.hero-section h1 {
    font-size: 2.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hero-section .lead { font-size: 1.25rem; opacity: .9; }

@media (max-width: 768px) {
    .hero-section { padding: 3rem 0 2.5rem; }
    .hero-section h1 { font-size: 2rem; }
}

/* ---------- Cards ---------- */
.card { border-radius: var(--league-radius); overflow: hidden; }
.hover-lift { transition: transform .2s, box-shadow .2s; }
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--league-shadow);
}

/* ---------- Age Group Badges ---------- */
.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--league-green);
    border: 2px solid var(--league-accent, #D4AF37);
    color: white;
    font-family: 'Russo One', sans-serif;
    font-size: .85rem;
    white-space: nowrap;
}
.age-badge-lg {
    padding: 10px 24px;
    font-size: 1.1rem;
}
.age-badge-sm {
    padding: 4px 12px;
    font-size: .7rem;
}

/* ---------- Info Cards (Home) ---------- */
.info-card {
    border-left: 4px solid var(--league-accent, #D4AF37);
    border-radius: var(--league-radius);
    transition: transform .2s;
}
.info-card:hover { transform: translateY(-3px); }
.info-card .icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(107,29,45,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--league-green);
}

/* ---------- Steps ---------- */
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--league-accent, #D4AF37);
    color: var(--league-green-dark);
    font-family: 'Russo One', sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer-league {
    background: var(--league-green-dark);
    color: rgba(255,255,255,.7);
    padding: 3rem 0 2rem;
}
.footer-league h5 { color: var(--league-accent, #D4AF37); }
.footer-league a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: color .2s;
}
.footer-league a:hover { color: var(--league-accent, #D4AF37); }
.footer-league .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* ---------- Playbook ---------- */
.play-card {
    position: relative;
    border-radius: var(--league-radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.play-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.play-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.play-card .badge-number {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--league-accent, #D4AF37);
    color: var(--league-green-dark);
    font-weight: 700;
    font-size: .75rem;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ---------- Quiz ---------- */
.quiz-canvas-container {
    position: relative;
    background: #2D5016;
    border: 3px solid white;
    border-radius: 8px;
    overflow: hidden;
}
.quiz-canvas-container canvas {
    display: block;
    width: 100%;
    touch-action: none;
}

.player-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,.03);
    margin-bottom: 6px;
}
.player-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    flex-shrink: 0;
}

.score-display {
    font-family: 'Russo One', sans-serif;
    font-size: 3rem;
    line-height: 1;
}

/* Quiz – Multiple Choice card */
.quiz-choice-card {
    background: #fff;
    transition: border-color .2s;
}
.quiz-choice-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.quiz-player-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    border: 2px solid rgba(255,255,255,.5);
    flex-shrink: 0;
}
.quiz-opt.active,
.quiz-opt.btn-league-gold {
    font-weight: 600;
}

/* Quiz – Drag & Drop Match */
.draggable-player {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: grab;
    border: 3px solid rgba(255,255,255,.6);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    user-select: none;
    -webkit-user-select: none;
    transition: transform .15s, box-shadow .15s;
}
.draggable-player:active { cursor: grabbing; transform: scale(1.15); }

.drop-target {
    background: rgba(0,0,0,.03);
    border: 2px dashed #ccc;
    min-height: 56px;
    transition: background .15s, border-color .15s;
}
.drop-target.hover {
    background: rgba(45,80,22,.08);
    border-color: var(--league-green, #2D5016);
}
.dropped-badges .draggable-player {
    width: 32px;
    height: 32px;
    font-size: .8rem;
    cursor: grab;
}

/* Quiz – Result highlights */
.match-correct {
    box-shadow: 0 0 0 3px #198754 !important;
}
.match-wrong {
    box-shadow: 0 0 0 3px #dc3545 !important;
}
.quiz-choice-card.border-success { border-color: #198754 !important; border-width: 2px; }
.quiz-choice-card.border-danger  { border-color: #dc3545 !important; border-width: 2px; }

/* Hint overlay (kept for compatibility) */
.hint-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 5;
}
.hint-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.hint-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

/* ---------- Leaderboard ---------- */
.leaderboard-row { transition: background .15s; }
.leaderboard-row:hover { background: rgba(107,29,45,.04); }
.trophy-gold { color: #FFD700; }
.trophy-silver { color: #C0C0C0; }
.trophy-bronze { color: #CD7F32; }

/* ---------- Registration Form ---------- */
.form-section-title {
    font-family: 'Russo One', sans-serif;
    color: var(--league-green);
    border-bottom: 2px solid var(--league-accent, #D4AF37);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--league-green);
    box-shadow: 0 0 0 .2rem rgba(107,29,45,.15);
}

/* ---------- Contact Cards ---------- */
.contact-card {
    border-top: 4px solid var(--league-accent, #D4AF37);
    border-radius: var(--league-radius);
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--league-green) 0%, var(--league-green-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -30px; left: 0; right: 0;
    height: 60px;
    background: var(--league-bg);
    transform: skewY(2deg);
}

/* ---------- Admin Sidebar ---------- */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--league-green-dark);
    color: rgba(255,255,255,.8);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform .3s;
}
.admin-sidebar .brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.7);
    padding: .6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 0;
    transition: all .15s;
}
.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,.08);
    color: white;
}
.admin-sidebar .nav-link.active {
    background: rgba(212,175,55,.15);
    color: var(--league-accent, #D4AF37);
    border-left: 3px solid var(--league-accent, #D4AF37);
}
.admin-sidebar .nav-link i { width: 20px; text-align: center; }

.admin-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
    }
}

/* Admin mobile toggle */
.admin-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1050;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--league-green);
    color: white;
    border: none;
    font-size: 1.25rem;
}
@media (max-width: 991.98px) { .admin-toggle { display: flex; align-items: center; justify-content: center; } }

/* Admin flash alerts */
.admin-flash {
    animation: flashIn .3s ease-out;
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Animations ---------- */
.fade-in {
    animation: fadeIn .6s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Utility ---------- */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.football-icon::before {
    content: '\f44e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Print styles */
@media print {
    .navbar-league, .footer-league, .btn, .no-print { display: none !important; }
    .admin-sidebar { display: none !important; }
    .admin-content { margin-left: 0 !important; }
    body { background: white !important; }
}

/* ---------- Sponsors ---------- */
.sponsor-text {
    font-family: 'Russo One', sans-serif;
    font-size: .85rem;
    color: var(--league-muted);
    line-height: 1.3;
}
.sponsor-text small {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: .7rem;
    letter-spacing: .5px;
    text-transform: uppercase;
}
