/* ============================================================
   BEJOICE PREMIER LEAGUE — POOLS & GROUPS PAGE STYLESHEET
   Standalone page: pools.html
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --po-navy-deep: #001B5E;
    --po-navy: #001037;
    --po-blue: #003BFF;
    --po-electric: #00A8FF;
    --po-cyan: #00d4ff;
    --po-gold: #FFD43B;
    --po-gold-deep: #F5B942;
    --po-gold-glow: rgba(255, 212, 59, 0.35);
    --po-blue-glow: rgba(0, 59, 255, 0.55);
    --po-electric-glow: rgba(0, 168, 255, 0.45);
    --po-cyan-glow: rgba(0, 212, 255, 0.35);
    --po-white: #ffffff;
    --po-muted: #b9c6e8;
    --po-card-bg: linear-gradient(135deg, rgba(13, 24, 66, 0.92) 0%, rgba(7, 14, 43, 0.94) 100%);
    --po-border-glow: 0 0 0 1px rgba(0, 168, 255, 0.35), 0 0 18px rgba(0, 168, 255, 0.18);
}

/* ── Base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--po-white);
    background-color: var(--po-navy-deep);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Dark navy royal stadium background with radial glows */
.pools-body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 700px at 50% -10%, rgba(0, 59, 255, 0.35) 0%, transparent 60%),
        radial-gradient(900px 600px at 8% 30%, var(--po-blue-glow) 0%, transparent 55%),
        radial-gradient(900px 600px at 92% 70%, var(--po-electric-glow) 0%, transparent 55%),
        linear-gradient(180deg, var(--po-navy) 0%, var(--po-navy-deep) 45%, #000a24 100%);
    background-attachment: fixed;
}

.po-skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--po-blue);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    z-index: 2000;
    text-decoration: none;
    font-weight: 600;
}

.po-skip-link:focus {
    left: 0;
}

/* ── Stadium ambience ──────────────────────────────────────── */
.pools-ambience {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.po-stadium-glow {
    position: absolute;
    width: 900px;
    height: 900px;
    left: 50%;
    top: 8%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 168, 255, 0.16) 0%, transparent 65%);
    filter: blur(10px);
}

/* Floodlight beam cones */
.po-floodlight {
    position: absolute;
    top: -8%;
    width: 220px;
    height: 70vh;
    opacity: 0.5;
    filter: blur(2px);
}

.po-floodlight-left {
    left: 12%;
    background: conic-gradient(from 165deg at 50% 0%, rgba(0, 212, 255, 0.28) 0deg, transparent 55deg);
    animation: po-pulse 7s ease-in-out infinite;
}

.po-floodlight-right {
    right: 12%;
    background: conic-gradient(from -15deg at 50% 0%, rgba(0, 212, 255, 0.28) 0deg, transparent 55deg);
    animation: po-pulse 7s ease-in-out infinite 3.5s;
}

@keyframes po-pulse {

    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 0.6;
    }
}

/* Star field */
.po-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.7) 50%, transparent 50%),
        radial-gradient(1px 1px at 120px 90px, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 220px 160px, rgba(0, 212, 255, 0.7) 50%, transparent 50%),
        radial-gradient(1px 1px at 340px 60px, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
        radial-gradient(1px 1px at 460px 200px, rgba(0, 212, 255, 0.5) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 580px 120px, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
        radial-gradient(1px 1px at 700px 40px, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
        radial-gradient(1px 1px at 820px 180px, rgba(0, 212, 255, 0.6) 50%, transparent 50%);
    background-size: 930px 230px;
    background-repeat: repeat;
    opacity: 0.5;
    animation: po-drift 60s linear infinite;
}

@keyframes po-drift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 930px 230px;
    }
}

/* ── Back link ─────────────────────────────────────────────── */
.po-back-link {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--po-white);
    background: rgba(0, 22, 72, 0.6);
    border: 1px solid rgba(0, 168, 255, 0.4);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.po-back-link:hover {
    transform: translateY(-2px);
    border-color: var(--po-cyan);
    box-shadow: 0 6px 24px var(--po-cyan-glow);
}

/* ── Main layout ───────────────────────────────────────────── */
.pools-main {
    position: relative;
    z-index: 1;
    padding: 140px 20px 60px;
    min-height: 100vh;
}

.pools-section {
    max-width: 1240px;
    margin: 0 auto;
}

/* ── Header ────────────────────────────────────────────────── */
.pools-header {
    text-align: center;
    margin-bottom: 60px;
}

.po-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--po-gold);
    text-shadow: 0 0 14px var(--po-gold-glow);
    margin-bottom: 14px;
}

.po-kicker i {
    font-size: 15px;
}

.po-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(52px, 9vw, 104px);
    line-height: 0.95;
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
    color: var(--po-white);
    text-shadow: 0 0 30px rgba(0, 168, 255, 0.35);
}

.po-title span {
    display: block;
    background: linear-gradient(180deg, #fff 0%, var(--po-gold) 60%, var(--po-gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 22px var(--po-gold-glow));
}

.po-title-rule {
    width: 220px;
    height: 3px;
    margin: 26px auto 18px;
    border-radius: 6px;
    background: linear-gradient(90deg, transparent, var(--po-cyan), var(--po-gold), var(--po-cyan), transparent);
    box-shadow: 0 0 16px var(--po-cyan-glow);
}

.po-seasons {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--po-muted);
}

/* ── Stage / grid ──────────────────────────────────────────── */
.pools-stage {
    position: relative;
}

.pools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Vertical glowing divider between groups (desktop) */
.pools-grid::after {
    content: '';
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, var(--po-cyan), var(--po-gold), var(--po-cyan), transparent);
    box-shadow: 0 0 22px var(--po-cyan-glow);
}

/* ── Group column ──────────────────────────────────────────── */
.po-group {
    position: relative;
}

/* Championship-style framed header */
.po-group-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px 20px;
    text-align: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 59, 255, 0.28) 0%, rgba(0, 22, 72, 0.6) 60%, rgba(0, 168, 255, 0.18) 100%);
    border: 1px solid rgba(0, 168, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 212, 59, 0.18), 0 0 30px var(--po-blue-glow), inset 0 0 24px rgba(0, 168, 255, 0.12);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.po-group-head::before,
.po-group-head::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 46px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--po-gold));
    box-shadow: 0 0 10px var(--po-gold-glow);
}

.po-group-head::before {
    left: 14px;
    transform: translateY(-50%);
}

.po-group-head::after {
    right: 14px;
    transform: translateY(-50%) rotate(180deg);
}

.po-group-badge {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 212, 59, 0.6);
    background: radial-gradient(circle at 30% 25%, rgba(255, 212, 59, 0.3), rgba(0, 59, 255, 0.35));
    box-shadow: 0 0 16px var(--po-gold-glow);
    color: var(--po-gold);
    font-size: 20px;
}

.po-group-name {
    position: relative;
    z-index: 3;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 38px;
    letter-spacing: 3px;
    margin: 0;
    color: var(--po-white);
    text-shadow: 0 0 18px var(--po-cyan-glow);
}

.po-group-name span {
    color: var(--po-gold);
}

.po-group-team-count {
    position: absolute;
    right: 16px;
    bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--po-muted);
}

/* Gold corner decorations on group header */
.po-gold-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--po-gold);
    box-shadow: 0 0 8px var(--po-gold-glow);
    z-index: 2;
}

.po-gold-corner.po-tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 4px;
}

.po-gold-corner.po-tr {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 4px;
}

.po-gold-corner.po-bl {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 4px;
}

.po-gold-corner.po-br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 4px;
}

/* ── Team list ─────────────────────────────────────────────── */
.po-team-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Futuristic horizontal team card */
.po-team-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--po-card-bg);
    border: 1px solid rgba(0, 168, 255, 0.35);
    box-shadow: var(--po-border-glow);
    cursor: default;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    overflow: hidden;
    animation: po-card-in 0.5s ease both;
}

@keyframes po-card-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Neon accent line on the left edge */
.po-team-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--po-electric), var(--po-cyan));
    box-shadow: 0 0 12px var(--po-electric-glow);
    opacity: 0.85;
}

.po-team-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.4), 0 12px 34px rgba(0, 59, 255, 0.45), 0 0 26px var(--po-electric-glow);
}

/* Circular logo */
.po-team-logo {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid rgba(0, 212, 255, 0.6);
    background: radial-gradient(circle at 30% 25%, rgba(0, 168, 255, 0.35), rgba(0, 22, 72, 0.9));
    position: relative;
    box-shadow: 0 0 14px var(--po-electric-glow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.po-team-card:hover .po-team-logo {
    transform: scale(1.08);
    box-shadow: 0 0 22px var(--po-cyan-glow);
}

.po-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback initial-letter badge — shown when logo image fails to load */
.po-team-logo-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    place-items: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 30px;
    color: var(--po-gold);
    background: linear-gradient(135deg, var(--po-blue) 0%, var(--po-navy-deep) 100%);
    text-shadow: 0 0 12px var(--po-gold-glow);
    border-radius: 50%;
    overflow: hidden;
}

/* Hide broken image and show fallback when the image fails to load */
.po-team-logo img.po-img-error {
    display: none;
}

.po-team-logo img.po-img-error+.po-team-logo-fallback {
    display: grid;
}

/* Team info */
.po-team-info {
    flex: 1;
    min-width: 0;
}

.po-team-tag {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--po-cyan);
    opacity: 0.85;
    margin-bottom: 3px;
}

.po-team-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--po-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right chevron */
.po-team-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--po-cyan);
    border: 1px solid rgba(0, 168, 255, 0.4);
    background: rgba(0, 168, 255, 0.08);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.po-team-card:hover .po-team-arrow {
    transform: translateX(3px);
    background: var(--po-cyan);
    color: var(--po-navy-deep);
}

/* Gold decorative element at the right edge of each team card */
.po-gold-edge {
    flex: 0 0 auto;
    position: relative;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
}

.po-gold-edge::before,
.po-gold-edge::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 16px;
    background: linear-gradient(180deg, var(--po-gold) 0%, var(--po-gold-deep) 50%, var(--po-gold) 100%);
    border-radius: 3px;
    box-shadow: 0 0 8px var(--po-gold-glow);
}

.po-gold-edge::before {
    top: 2px;
    left: 0;
    transform: rotate(-18deg);
}

.po-gold-edge::after {
    bottom: 2px;
    right: 0;
    transform: rotate(18deg);
}

/* ── Footer note ───────────────────────────────────────────── */
.pools-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 56px;
}

.pools-footer-note p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--po-muted);
}

.po-foot-line {
    width: 70px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--po-cyan));
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .pools-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .pools-grid::after {
        display: none;
    }

    .pools-main {
        padding-top: 110px;
    }
}

@media (max-width: 480px) {
    .pools-main {
        padding: 100px 14px 40px;
    }

    .po-group-head {
        padding: 14px 12px;
    }

    .po-group-name {
        font-size: 32px;
    }

    .po-team-card {
        padding: 12px 12px;
    }

    .po-team-logo {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
    }

    .po-team-name {
        font-size: 15px;
    }

    .po-back-link {
        top: 14px;
        left: 14px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ── Tournament CTA Button ─────────────────────────────────── */
.po-tournament-cta {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.po-btn-tournament {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 50px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--po-navy-deep);
    background: linear-gradient(135deg, var(--po-cyan), var(--po-gold));
    border: 2px solid var(--po-cyan);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.25), 0 10px 30px rgba(0, 59, 255, 0.45),
        0 0 24px var(--po-cyan-glow);
    transition: all .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.po-btn-tournament .po-btn-tournament-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.po-btn-tournament:hover {
    background: linear-gradient(135deg, var(--po-gold), var(--po-cyan));
    border-color: #fff;
    color: var(--po-navy-deep);
    box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.4), 0 15px 35px rgba(0, 59, 255, 0.45),
        0 0 24px var(--po-cyan);
    transform: translateY(-3px);
}

.po-btn-tournament i {
    font-size: 18px;
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}