/* =========================================================================
   GoalPool design system
   Dark, glassmorphic, pitch-green + trophy-gold accents.
   ========================================================================= */

:root {
    --bg: #090c12;
    --bg-elevated: #0f1420;
    --surface: rgba(255, 255, 255, 0.055);
    --surface-strong: rgba(255, 255, 255, 0.09);
    --surface-border: rgba(255, 255, 255, 0.10);
    --text: #f3f5f8;
    --text-muted: #9aa4b6;
    --text-faint: #6b7488;

    --accent: #22c55e;         /* pitch green */
    --accent-dark: #16a34a;
    --accent-glow: rgba(34, 197, 94, 0.35);
    --gold: #f5b93d;           /* trophy gold */
    --gold-dark: #d99a1f;

    --danger: #f75c5c;
    --warning: #f5b93d;
    --success: #22c55e;
    --info: #38bdf8;

    /* Sharp, flat corners by design - a deliberate "professional data
       platform" look, not glassmorphism. Cards/panels get 0; small controls
       (inputs, pills, circular avatars) keep their own explicit radii. */
    --radius-lg: 0px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow-green: 0 8px 30px rgba(34, 197, 94, 0.25);
    --shadow-glow-gold: 0 8px 30px rgba(245, 185, 61, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    position: relative;
    min-height: 100vh;
}

/* Ambient background glow - subtle radial mesh behind everything */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 197, 94, 0.16), transparent 40%),
        radial-gradient(circle at 88% 15%, rgba(245, 185, 61, 0.10), transparent 35%),
        radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.08), transparent 45%),
        var(--bg);
}

h1, h2, h3, h4, h5, h6, .display-6, .fw-bold {
    font-family: 'Outfit', 'Inter', sans-serif;
}

a { text-decoration: none; }

::selection { background: var(--accent); color: #04150a; }

/* ---------------------------------------------------------------------
   Navbar - fixed, blurred glass over hero content
   --------------------------------------------------------------------- */
.navbar.gp-nav {
    background: rgba(9, 12, 18, 0.72) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--surface-border);
    padding-top: .85rem;
    padding-bottom: .85rem;
}

.gp-nav .navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--gold);
}

.gp-nav .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    position: relative;
    margin: 0 .35rem;
    transition: color .2s ease;
}

.gp-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
    border-radius: 2px;
}

.gp-nav .nav-link:hover,
.gp-nav .nav-link.active {
    color: var(--text) !important;
}

.gp-nav .nav-link:hover::after,
.gp-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* ---------------------------------------------------------------------
   Hero sections - full-bleed background image + gradient scrim
   --------------------------------------------------------------------- */
.gp-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.gp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 9, 14, 0.55) 0%, rgba(6, 9, 14, 0.88) 75%, var(--bg) 100%),
        linear-gradient(90deg, rgba(6, 9, 14, 0.75) 0%, rgba(6, 9, 14, 0.15) 55%);
}

.gp-hero > .container { position: relative; z-index: 1; }

.gp-hero-full {
    min-height: 100vh;
    /* 100vh on mobile browsers is measured against the viewport with the
       URL bar hidden, so it overshoots what's actually visible on load.
       svh/dvh (when supported) track the real visible area instead -
       layered on as a progressive enhancement, never a regression. */
    min-height: 100svh;
}

@media (max-width: 575px) {
    .gp-hero-full {
        padding-block: 2.5rem;
    }
}

.gp-hero-banner {
    min-height: 300px;
    padding: 3.5rem 0 3rem;
}

@media (max-width: 767px) {
    .gp-hero-banner { min-height: 220px; padding: 2.5rem 0 2rem; }
}

.gp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(245, 185, 61, 0.12);
    border: 1px solid rgba(245, 185, 61, 0.28);
    padding: .35rem .85rem;
    border-radius: 100px;
}

.gp-title-xl {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
}

.gp-title-lg {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.gp-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ---------------------------------------------------------------------
   Glass cards
   --------------------------------------------------------------------- */
.card, .gp-card {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.card:hover.gp-hover,
.gp-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: var(--shadow-glow-green);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card, .gp-hover { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }

.gp-card-solid {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
    border-radius: 100px;
    font-weight: 600;
    padding: .55rem 1.3rem;
    letter-spacing: -0.01em;
}

.btn-warning,
.btn-primary {
    background: var(--accent);
    border: none;
    color: #04150a;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}

.btn-warning:hover, .btn-warning:focus,
.btn-primary:hover, .btn-primary:focus {
    background: #34d472;
    color: #04150a;
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
    transform: translateY(-1px);
}

.btn-gold {
    background: var(--gold);
    border: none;
    color: #241701;
    box-shadow: 0 4px 18px rgba(245, 185, 61, 0.35);
}

.btn-gold:hover { color: #241701; transform: translateY(-1px); }

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light {
    border: 1px solid var(--surface-border);
    color: var(--text);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover {
    background: var(--surface-strong);
    border-color: var(--accent);
    color: #fff;
}

.btn-outline-danger {
    border: 1px solid rgba(247, 92, 92, 0.5);
    color: #ff9b9b;
    background: transparent;
}

.btn-outline-danger:hover {
    background: rgba(247, 92, 92, 0.15);
    border-color: var(--danger);
    color: #fff;
}

.btn-link { color: var(--text-muted); }
.btn-link:hover { color: var(--text); }

.btn:disabled { opacity: .45; }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: .65rem .9rem;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    color: var(--text);
}

.form-control::placeholder { color: var(--text-faint); }

.input-group-text {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--surface-border);
    color: var(--text-muted);
}

.form-label { color: var(--text-muted); font-weight: 500; font-size: .9rem; }

.otp-input {
    letter-spacing: 0.6em;
    font-size: 1.6rem;
    text-align: center;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table {
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-hover-color: var(--text);
    border-color: var(--surface-border);
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    background: transparent;
    border-bottom-color: var(--surface-border);
    color: var(--text);
}

.table thead th {
    color: var(--text-faint);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--surface-border);
}

/* ---------------------------------------------------------------------
   Leaderboard
   --------------------------------------------------------------------- */
.leaderboard-row.rank-1 {
    background: rgba(245, 185, 61, 0.09);
    box-shadow: inset 3px 0 0 var(--gold);
}
.leaderboard-row.rank-2 {
    background: rgba(200, 210, 224, 0.06);
    box-shadow: inset 3px 0 0 #c8d2e0;
}
.leaderboard-row.rank-3 {
    background: rgba(217, 119, 6, 0.07);
    box-shadow: inset 3px 0 0 #d97706;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .85rem;
    background: rgba(255, 255, 255, 0.08);
}
.rank-1 .rank-badge { background: var(--gold); color: #241701; }
.rank-2 .rank-badge { background: #c8d2e0; color: #14181f; }
.rank-3 .rank-badge { background: #d97706; color: #1c0d02; }

/* ---------------------------------------------------------------------
   Badges, progress, misc
   --------------------------------------------------------------------- */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 8px; padding: .4em .65em; }

.progress {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 100px;
    overflow: hidden;
}
.progress-bar {
    background: var(--accent);
}

.pool-card .badge-status { font-size: 0.72rem; }

.pulse { animation: pulse-bg 1.1s ease; }
@keyframes pulse-bg {
    0% { background-color: rgba(34, 197, 94, 0.25); }
    100% { background-color: transparent; }
}

.gp-stat-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    background: rgba(34, 197, 94, 0.14);
    color: var(--accent);
}

.text-muted { color: var(--text-muted) !important; }

.alert {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
}
.alert-danger { background: rgba(247, 92, 92, 0.12); border-color: rgba(247, 92, 92, 0.35); color: #ffb4b4; }
.alert-success { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); color: #7be3a3; }

.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    color: var(--text);
}
.modal-header, .modal-footer { border-color: var(--surface-border); }
.btn-close { filter: invert(1) grayscale(1) brightness(1.8); }

.nav-tabs { border-bottom: 1px solid var(--surface-border); }
.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
}
.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--text);
    border-bottom: 2px solid var(--accent);
}

.list-group-item {
    background: transparent;
    border-color: var(--surface-border);
    color: var(--text);
}

/* ---------------------------------------------------------------------
   Reveal-on-scroll utility (see footer.php)
   --------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade/slide the whole page in on load */
.gp-fade-in { animation: gp-fade-in .6s ease both; }
@keyframes gp-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Admin portal shell - sidebar + topbar layout
   ========================================================================= */
.gp-admin-shell {
    display: flex;
    min-height: 100vh;
}

.gp-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--surface-border);
    padding: 1.5rem 1.1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
    transition: transform .25s ease;
}

.gp-sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    padding: .4rem .6rem 1.5rem;
}

.gp-sidebar-eyebrow {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 0 .8rem;
    margin-bottom: .5rem;
    margin-top: 1.25rem;
}

.gp-sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .8rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: .92rem;
    margin-bottom: .15rem;
    transition: background .18s ease, color .18s ease;
}

.gp-sidebar-link i { font-size: 1.05rem; width: 20px; text-align: center; }

.gp-sidebar-link:hover {
    background: var(--surface-strong);
    color: #fff;
}

.gp-sidebar-link.active {
    background: rgba(34, 197, 94, 0.12);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--accent);
}

.gp-sidebar-link .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: .68rem;
    border-radius: 100px;
    padding: .15em .5em;
}

.gp-sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-border);
}

.gp-admin-main {
    flex: 1;
    min-width: 0;
}

.gp-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(9, 12, 18, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--surface-border);
    padding: 1.1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gp-admin-content {
    padding: 2rem;
}

.gp-sidebar-toggle {
    display: none;
}

@media (max-width: 991px) {
    .gp-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-soft);
    }
    .gp-sidebar.is-open { transform: translateX(0); }
    .gp-sidebar-toggle { display: inline-flex; }
    .gp-admin-content { padding: 1.25rem; }
    .gp-topbar { padding: 1rem 1.25rem; }
}

.gp-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9;
}
.gp-sidebar-backdrop.is-open { display: block; }

.gp-access-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.gp-admin-user-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .3rem .6rem .3rem .3rem;
    border-radius: 100px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
}

.gp-admin-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    font-family: 'Outfit', sans-serif;
    color: #04150a;
    background: var(--accent);
    flex-shrink: 0;
}

/* =========================================================================
   FPL squad pitch view (team.php) - stadium-quality broadcast graphic
   ========================================================================= */
@keyframes gpPitchShimmer {
    0%   { transform: translateX(-120%) skewX(-18deg); }
    100% { transform: translateX(220%) skewX(-18deg); }
}

@keyframes gpCardIn {
    from { opacity: 0; transform: translateY(14px) scale(.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gpCaptainGlow {
    0%, 100% { box-shadow: 0 0 0 3px var(--bg-elevated), 0 0 0 6px rgba(245,185,61,.55), 0 2px 10px rgba(245,185,61,.5); }
    50%      { box-shadow: 0 0 0 3px var(--bg-elevated), 0 0 0 9px rgba(245,185,61,.25), 0 2px 16px rgba(245,185,61,.7); }
}

/* Real pitches are mown in alternating straight bands running the length
   of the field - that's what actually reads as "grass" at a glance, not a
   diagonal color wash. Two close, solid greens, hard-edged stripes. */
.gp-pitch {
    background:
        repeating-linear-gradient(
            0deg,
            #2a9c44 0px, #2a9c44 56px,
            #259240 56px, #259240 112px
        ),
        radial-gradient(ellipse 100% 55% at 50% 4%, rgba(255,255,255,0.08), transparent 65%),
        radial-gradient(ellipse 120% 70% at 50% 100%, rgba(0,0,0,0.30), transparent 70%);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    padding: 3rem 1rem 1.5rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.08),
        inset 0 0 90px rgba(0,0,0,0.35),
        0 20px 50px -12px rgba(0,0,0,0.55);
}

/* The goal net - a diamond-mesh texture sitting just inside the top goal
   line, fading out as it recedes into the six-yard box. Kept fully inside
   the touchline frame (never crossing the bold boundary line itself - that
   was what looked broken before) and behind the six-yard box's own lines,
   which paint after it and take visual priority wherever they cross. */
.gp-goal-net {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 150px;
    height: 34px;
    transform: translateX(-50%);
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 12px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 12px);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Outer touchline frame, inset slightly from the card edge for a
   broadcast-graphic feel rather than a flat rectangle. Bold, properly
   white markings - a pitch graphic reads as "real" by its lines being
   crisp, not by being subtle. */
.gp-pitch-lines {
    position: absolute;
    inset: 14px;
    border: 3px solid rgba(255,255,255,0.92);
    border-radius: 10px;
    pointer-events: none;
    z-index: 0;
}

.gp-pitch-lines::before {
    /* halfway line */
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.92);
    transform: translateY(-50%);
}

.gp-center-circle {
    position: absolute;
    top: 50%; left: 50%;
    width: 128px; height: 128px;
    border: 3px solid rgba(255,255,255,0.92);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.gp-center-circle::after {
    /* center spot */
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 7px; height: 7px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.gp-box {
    position: absolute;
    left: 50%;
    width: min(66%, 320px);
    height: 78px;
    border: 3px solid rgba(255,255,255,0.92);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

.gp-box::before {
    /* six-yard box */
    content: '';
    position: absolute;
    left: 50%;
    width: 44%;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.92);
    transform: translateX(-50%);
}

.gp-box-top { top: 14px; border-top: none; }
.gp-box-top::before { top: 0; border-top: none; }
.gp-box-top .gp-penalty-spot { top: 52px; }

.gp-box-bottom { bottom: 14px; border-bottom: none; }
.gp-box-bottom::before { bottom: 0; border-bottom: none; }

.gp-penalty-spot {
    position: absolute;
    left: 50%;
    bottom: 52px;
    width: 6px; height: 6px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    transform: translateX(-50%);
}

/* The "D" - the one marking most pitch graphics skip, and the one that
   actually makes it read as a real penalty area instead of a plain box.
   A clipped circle: the container shows only the arc bulging away from
   goal, toward the center of the pitch. */
.gp-arc {
    position: absolute;
    left: 50%;
    width: 90px;
    height: 40px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    transform: translateX(-50%);
}
.gp-arc::after {
    content: '';
    position: absolute;
    left: 0;
    width: 90px;
    height: 90px;
    border: 3px solid rgba(255,255,255,0.92);
    border-radius: 50%;
}
.gp-arc-top { top: 92px; }
.gp-arc-top::after { top: -50px; }
.gp-arc-bottom { bottom: 92px; }
.gp-arc-bottom::after { bottom: -50px; }

/* A soft beam of light sweeping across the pitch every so often - a subtle
   floodlight-broadcast touch, not a distracting animation. */
.gp-pitch-shine {
    position: absolute;
    top: -20%;
    left: 0;
    width: 45%;
    height: 140%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05) 45%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.05) 55%, transparent);
    animation: gpPitchShimmer 7s ease-in-out infinite;
    animation-delay: 1.2s;
    pointer-events: none;
    z-index: 0;
}

.gp-pitch-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.1rem;
    margin-bottom: 2.25rem;
    position: relative;
    z-index: 1;
}

.gp-pitch-row:last-of-type { margin-bottom: 0.5rem; }

.gp-pitch-row-label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: rgba(255,255,255,0.22);
    z-index: 0;
    display: none;
}

@media (min-width: 768px) {
    .gp-pitch-row-label { display: block; }
}

/* Position accent colors - tint the photo ring and shadow puddle so a
   squad reads at a glance even before the name registers. */
:root {
    --pos-gkp: #f5b93d;
    --pos-def: #38bdf8;
    --pos-mid: #22c55e;
    --pos-fwd: #f75c5c;
}

.gp-player-card {
    position: relative;
    width: 104px;
    text-align: center;
    cursor: default;
    background: rgba(8, 14, 10, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    padding: 14px 6px 9px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform .22s cubic-bezier(.34,1.4,.64,1), box-shadow .22s ease, border-color .22s ease;
    opacity: 0;
    animation: gpCardIn .5s cubic-bezier(.22,1,.36,1) forwards;
}

/* The one authentic broadcast-graphic touch: a thin strip in the player's
   real club color along the top edge, same way Sky Sports/FPL's own squad
   graphics tag a player's team before you've read the shirt. Set per-card
   via --team-color (team.php looks it up from the player's team_short). */
.gp-player-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--team-color, var(--accent));
}

.gp-pitch-row:nth-of-type(1) .gp-player-card:nth-child(1) { animation-delay: .03s; }
.gp-pitch-row:nth-of-type(1) .gp-player-card:nth-child(2) { animation-delay: .08s; }
.gp-pitch-row:nth-of-type(1) .gp-player-card:nth-child(3) { animation-delay: .13s; }
.gp-pitch-row:nth-of-type(1) .gp-player-card:nth-child(4) { animation-delay: .18s; }
.gp-pitch-row:nth-of-type(1) .gp-player-card:nth-child(5) { animation-delay: .23s; }
.gp-pitch-row:nth-of-type(2) .gp-player-card:nth-child(n) { animation-delay: .1s; }
.gp-pitch-row:nth-of-type(3) .gp-player-card:nth-child(n) { animation-delay: .16s; }
.gp-pitch-row:nth-of-type(4) .gp-player-card:nth-child(n) { animation-delay: .22s; }

.gp-player-card:hover {
    transform: translateY(-6px) scale(1.045);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    z-index: 3;
}

/* The actual club kit, not a face photo - shown flat the way a real squad
   graphic shows it, not cropped into a circle (a shirt's shoulders and
   collar don't read right clipped to a circle the way a headshot does). */
.gp-player-shirt {
    position: relative;
    width: 66px;
    height: 66px;
    margin: 2px auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-player-shirt img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.gp-player-shirt-fallback {
    font-size: 1.8rem;
    color: rgba(255,255,255,.35);
}

.gp-player-badge {
    position: absolute;
    top: -6px; left: 50%;
    transform: translateX(-50%);
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    font-weight: 800;
    color: #04150a;
    background: var(--gold);
    box-shadow: 0 0 0 3px var(--bg-elevated), 0 2px 6px rgba(0,0,0,0.4);
    z-index: 2;
    animation: gpCaptainGlow 2.4s ease-in-out infinite;
}

.gp-player-badge.vice {
    background: #c8d2e0;
    animation: none;
    box-shadow: 0 0 0 3px var(--bg-elevated), 0 2px 6px rgba(0,0,0,0.4);
}

.gp-player-points {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    font-size: .8rem;
    font-weight: 800;
    color: #04150a;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 9px;
    border-radius: 100px;
    margin-bottom: 6px;
}

.gp-player-points.pts-good {
    background: var(--accent);
    box-shadow: 0 0 14px rgba(34,197,94,.55);
}
.gp-player-points.pts-mid { background: var(--gold); }
.gp-player-points.pts-none { background: rgba(255, 255, 255, 0.14); color: rgba(255,255,255,0.6); }

.gp-player-card.flagged {
    border-color: rgba(247, 92, 92, 0.5);
    box-shadow: 0 6px 18px rgba(247, 92, 92, 0.2);
}

.gp-player-card.flagged::after {
    content: '\26A0';
    position: absolute;
    top: -6px; right: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: .64rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 3px var(--bg-elevated);
    z-index: 2;
}

.gp-player-name {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.gp-player-team {
    font-size: .66rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.gp-bench {
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: 6px;
    padding: 1.1rem 1rem 1.25rem;
    margin-top: 1.1rem;
    position: relative;
}

.gp-bench::before {
    /* dugout-style top divider tab */
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 64px; height: 3px;
    background: var(--gold);
    transform: translateX(-50%);
}

.gp-bench-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-faint);
    margin-bottom: .9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.gp-bench-label::before,
.gp-bench-label::after {
    content: '';
    height: 1px;
    width: 32px;
    background: var(--surface-border);
}

.gp-bench .gp-player-card {
    opacity: .88;
}

/* A 5-wide formation row at full card size doesn't fit a phone screen -
   shrink the card, photo, and type scale together rather than letting it
   wrap awkwardly mid-row. */
@media (max-width: 480px) {
    .gp-pitch { padding: 2.25rem .5rem 1rem; }
    .gp-pitch-row { gap: .5rem; margin-bottom: 1.5rem; }
    .gp-player-card { width: 72px; padding: 11px 3px 7px; }
    .gp-player-shirt { width: 48px; height: 48px; margin: 3px auto 8px; }
    .gp-player-name { font-size: .7rem; }
    .gp-player-team { font-size: .6rem; }
    .gp-player-points { font-size: .7rem; padding: 2px 7px; min-width: 30px; margin-bottom: 4px; }
    .gp-player-badge { width: 20px; height: 20px; font-size: .62rem; top: -5px; }
}

/* Scrollbar polish (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232a38; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #2e3648; }

/* =========================================================================
   Landing page — hero redesign, hope statement, video widget
   ========================================================================= */
.text-faint { color: var(--text-faint) !important; }

/* A quiet, solid stadium-at-night backdrop for secondary-page banners -
   one restrained highlight, not a wash of colored blobs. Layered under the
   existing .gp-hero::before scrim. */
.gp-hero-stadium {
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(34, 197, 94, 0.14), transparent 65%),
        #0a0d13;
}

.gp-hero-beams {
    position: absolute;
    inset: -10% -5% auto -5%;
    height: 70%;
    pointer-events: none;
    z-index: 0;
    background:
        conic-gradient(from 200deg at 12% 0%, transparent 0deg, rgba(255,255,255,0.05) 8deg, transparent 20deg),
        conic-gradient(from 160deg at 88% 0%, transparent 0deg, rgba(255,255,255,0.045) 10deg, transparent 24deg);
    animation: gpBeamDrift 16s ease-in-out infinite alternate;
}
@keyframes gpBeamDrift {
    0%   { opacity: .6; transform: translateX(0); }
    100% { opacity: 1; transform: translateX(2%); }
}

.gp-hero-pitchlines {
    position: absolute;
    left: 0; right: 0; bottom: -60px;
    height: 240px;
    z-index: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 48px);
    -webkit-mask-image: linear-gradient(to top, black, transparent 85%);
    mask-image: linear-gradient(to top, black, transparent 85%);
    transform: perspective(380px) rotateX(55deg);
    transform-origin: bottom;
}

@media (prefers-reduced-motion: reduce) {
    .gp-hero-beams { animation: none; }
}

.gp-text-glow {
    color: var(--accent);
}

/* ---- Hero photo layer — real photography, not gradients, with a slow
   Ken Burns drift. A separate absolutely-positioned layer (not a
   background-image on .gp-hero itself) so the zoom animates the photo
   only, never the text on top of it. Sits behind .gp-hero::before's
   existing dark scrim via z-index:-1. ---- */
.gp-hero-photo-layer {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    animation: gpKenBurns 26s ease-in-out infinite alternate;
}
@keyframes gpKenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .gp-hero-photo-layer { animation: none; }
}

/* ---- Login card — a real photo up top, the form below. ---- */
.gp-login-card {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.gp-login-photo {
    height: 130px;
    background-size: cover;
    background-position: center 30%;
    position: relative;
}
.gp-login-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9,12,18,0.05) 0%, rgba(9,12,18,0.96) 100%);
}

.gp-login-tag {
    position: absolute;
    left: 1.1rem;
    bottom: .85rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #04150a;
    background: var(--accent);
    padding: .32rem .75rem;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.gp-login-body { padding: 1.75rem 1.75rem 2rem; }
@media (min-width: 768px) {
    .gp-login-body { padding: 2rem 2.25rem 2.25rem; }
}

.gp-login-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: .25rem;
}

.gp-login-sub {
    color: var(--text-muted);
    font-size: .88rem;
    margin-bottom: 1.25rem;
}

/* ---- Video widget ---- */
.gp-video-widget { max-width: 560px; margin: 0 auto; }

.gp-video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.gp-video-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.gp-video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 76px; height: 76px;
    border-radius: 50%;
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: #04150a;
    background: var(--accent);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.45);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.gp-video-play:hover { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 10px 36px rgba(34, 197, 94, 0.6); }
.gp-video-play i { margin-left: 4px; }

.gp-video-soon {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    text-align: center;
    padding: 1.5rem;
    background: rgba(9,12,18,0.92);
    color: var(--text-muted);
    font-size: .92rem;
}
.gp-video-soon i { font-size: 2rem; color: var(--gold); }

.gp-video-widget.gp-video-missing .gp-video-el,
.gp-video-widget.gp-video-missing .gp-video-play { display: none; }
.gp-video-widget.gp-video-missing .gp-video-soon { display: flex; }

.gp-video-caption {
    text-align: center;
    color: var(--text-faint);
    font-size: .82rem;
    margin: .85rem 0 0;
}

/* ---- Video showcase — the hero's right-hand column: a glowing halo
   behind the frame, a "see the money move" tag, sized to fill its
   column rather than sitting small and centered. ---- */
.gp-video-showcase {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.gp-video-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.32);
    padding: .4rem .9rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.gp-video-showcase .gp-video-frame {
    box-shadow:
        var(--shadow-soft),
        0 0 0 1px rgba(34, 197, 94, 0.22),
        0 20px 60px -16px rgba(34, 197, 94, 0.4);
}

/* ---- "Why" section — one confident statement, no gimmicks ---- */
.gp-statement {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.6vw, 2.6rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #fff;
    max-width: 820px;
    margin: 0 auto 1.1rem;
}
.gp-statement-sub {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Step numbers (how it works) ---- */
.gp-step-num {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: #04150a;
    background: var(--accent);
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
}

.gp-community-icon {
    font-size: 2.6rem;
    color: #25D366;
}

/* =========================================================================
   FAQ — native <details>/<summary> disclosures, themed to match.
   ========================================================================= */
.gp-faq-list { display: flex; flex-direction: column; gap: .85rem; }

.gp-faq-item {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.4rem;
}

.gp-faq-item summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 1.02rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.gp-faq-item summary::-webkit-details-marker { display: none; }

.gp-faq-item summary::after {
    content: '\f282';
    font-family: 'bootstrap-icons';
    font-size: 1rem;
    color: var(--text-faint);
    flex-shrink: 0;
    transition: transform .2s ease;
}
.gp-faq-item[open] summary::after { transform: rotate(180deg); }

.gp-faq-body { padding-top: .75rem; }
.gp-faq-body p { color: var(--text-muted); margin-bottom: 0; line-height: 1.6; }

/* =========================================================================
   Site footer
   ========================================================================= */
.gp-site-footer {
    border-top: 1px solid var(--surface-border);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.gp-footer-heading {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: .85rem;
}

.gp-footer-link {
    display: block;
    color: var(--text-muted);
    font-size: .92rem;
    margin-bottom: .6rem;
    transition: color .15s ease;
}
.gp-footer-link:hover { color: #fff; }
.gp-footer-link i { margin-right: .3rem; }

.gp-footer-bottom {
    border-top: 1px solid var(--surface-border);
    margin-top: 2rem;
    padding-top: 1.25rem;
}

/* =========================================================================
   Assistant page - locked/ignored player chips + typeahead dropdown
   ========================================================================= */
.gp-chip-input {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    min-height: 1.5rem;
}

.gp-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--surface-strong);
    border: 1px solid var(--surface-border);
    border-radius: 100px;
    padding: .25rem .4rem .25rem .7rem;
    font-size: .82rem;
    color: var(--text);
}
.gp-chip button {
    background: none;
    border: none;
    color: var(--text-faint);
    line-height: 1;
    font-size: 1rem;
    padding: 0 .3rem;
    cursor: pointer;
}
.gp-chip button:hover { color: #fff; }

.gp-typeahead {
    position: relative;
    z-index: 5;
    margin-top: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    max-height: 220px;
    overflow-y: auto;
}

.gp-typeahead-item {
    padding: .55rem .8rem;
    cursor: pointer;
    font-size: .88rem;
    border-bottom: 1px solid var(--surface-border);
}
.gp-typeahead-item:last-child { border-bottom: none; }
.gp-typeahead-item:hover { background: var(--surface-strong); }

/* ---- Live (ongoing gameweek) ---- */
.gp-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--danger);
    vertical-align: middle;
    animation: gp-live-blink 1.6s ease-in-out infinite;
}
.gp-live-dot.is-off { background: var(--text-faint); animation: none; }
@keyframes gp-live-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.gp-live-stat { border-left: 3px solid var(--accent); padding-left: 12px; }
.gp-live-stat .value { font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.gp-live-stat .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

.gp-live-pool .table { margin-bottom: 0; }
.gp-live-pool .is-me td { background: rgba(34, 197, 94, 0.10); }
.gp-live-pool .is-me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.gp-live-pool .prize-tag { font-size: 0.72rem; color: var(--gold); white-space: nowrap; }

@media (max-width: 480px) {
    .gp-live-stat .value { font-size: 1.3rem; }
    .gp-live-pool .hide-xs { display: none; }
}
