@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
body { font-family: 'Inter', sans-serif; scroll-behavior: smooth; }

/* Slot Enhancements */
.pitch-slot-wrapper { transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    z-index: 10; 
    position: relative; 
}
.pitch-slot-wrapper:hover { 
    transform: translateY(-6px) scale(1.05); 
    z-index: 20; 
}
.pitch-slot {
    position: relative;
    z-index: 2;
}
/* Shadow to make it look like it rests on grass */
.pitch-slot::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 12px;
    background: rgba(0,0,0,0.6);
    filter: blur(6px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pitch-slot-wrapper:hover .pitch-slot::after {
    bottom: -10px;
    width: 85%;
    background: rgba(0,0,0,0.4);
    filter: blur(8px);
}
 /* Empty slot overrides ensuring visibility on green pitch */
.pitch-slot:has(.fa-plus):not(.border-amber-400) {
    background: rgba(15, 23, 42, 0.4) !important; /* Darker to contrast green */
    backdrop-filter: blur(4px) !important;
    border: 2px dashed rgba(255, 255, 255, 0.5) !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}
.pitch-slot:has(.fa-plus):not(.border-amber-400):hover {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
}
.pitch-slot:has(.fa-plus).border-amber-400 {
    background: rgba(251, 191, 36, 0.15) !important;
    backdrop-filter: blur(6px) !important;
    border: 2px solid #fbbf24 !important;
    box-shadow: 0 0 25px rgba(251,191,36,0.4), inset 0 0 15px rgba(251,191,36,0.2) !important;
}
.pitch-slot:has(.fa-plus) .fa-plus {
    color: rgba(255, 255, 255, 0.8) !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: all 0.2s ease;
}
.pitch-slot:has(.fa-plus):hover .fa-plus {
    color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1);
}

/* Story Card Mock */
.story-mock {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    border: 4px solid #1e293b;
}
.story-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
 /* Hide scrollbar */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Visible elegant scrollbar for player pool */
.player-list::-webkit-scrollbar { width: 6px; }
.player-list::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.5); border-radius: 8px; margin-top: 10px; margin-bottom: 10px; }
.player-list::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.8); border-radius: 8px; }
.player-list::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 1); }

.hero-bg {
    isolation: isolate;
    /* Previous remote stadium fallback is intentionally kept as the final layer. */
    background-image:
        linear-gradient(180deg, rgba(2, 6, 23, 0.3) 0%, rgba(15, 23, 42, 0.42) 48%, rgba(2, 6, 23, 0.84) 100%),
        radial-gradient(circle at 50% 9%, rgba(96, 165, 250, 0.14), transparent 32%),
        radial-gradient(ellipse at 50% 100%, rgba(34, 197, 94, 0.12), transparent 44%),
        url('../assets/hero/squad11-hero-02.png'),
        url('https://images.unsplash.com/photo-1522778119026-d647f0596c20?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-position: center center, center center, center center, center 45%, center 56%;
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: normal, screen, soft-light, normal, normal;
}
/* Hero v2 background fade system - disable by removing hero-bg-fade layers */
.hero-bg::before,
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-position: center 45%;
    background-size: cover;
    background-repeat: no-repeat;
    will-change: opacity;
}
.hero-bg::before {
    background-image:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(15, 23, 42, 0.32) 48%, rgba(2, 6, 23, 0.8) 100%),
        radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.1), transparent 24%),
        radial-gradient(ellipse at 50% 92%, rgba(22, 163, 74, 0.1), transparent 46%),
        url('../assets/hero/squad11-hero-stadium-flags-2.png');
    animation: heroBgFadePrimary 30s ease-in-out infinite;
}
.hero-bg::after {
    background-image:
        linear-gradient(180deg, rgba(2, 6, 23, 0.22) 0%, rgba(15, 23, 42, 0.34) 48%, rgba(2, 6, 23, 0.82) 100%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.1), transparent 24%),
        radial-gradient(ellipse at 50% 92%, rgba(22, 163, 74, 0.12), transparent 46%),
        url('../assets/hero/squad11-hero-stadium-universal-1.png');
    opacity: 0;
    animation: heroBgFadeSecondary 30s ease-in-out infinite;
}
@keyframes heroBgFadePrimary {
    0%, 36% { opacity: 1; }
    48%, 88% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes heroBgFadeSecondary {
    0%, 36% { opacity: 0; }
    48%, 88% { opacity: 1; }
    100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-bg::before,
    .hero-bg::after {
        animation: none;
    }
    .hero-bg::before { opacity: 1; }
    .hero-bg::after { opacity: 0; }
}

/* Premium Squad Builder */
.squad-pitch-frame {
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}
.squad-pitch-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(255,255,255,0.18), transparent 24%),
        radial-gradient(circle at 82% 0%, rgba(255,255,255,0.14), transparent 26%),
        linear-gradient(180deg, rgba(15,23,42,0.1), rgba(2,6,23,0.52));
    pointer-events: none;
    z-index: 12;
    mix-blend-mode: screen;
}
.squad-pitch-surface {
    background-color: #176b36;
    background-image:
        radial-gradient(circle at 50% 48%, rgba(255,255,255,0.08), transparent 30%),
        linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(0deg, #2f8f49 0%, #2f8f49 8.5%, #237d3e 8.5%, #237d3e 17%),
        linear-gradient(180deg, #2f9650, #176b36 58%, #11542e);
    background-size: auto, 22px 22px, 18px 18px, auto, auto;
    box-shadow: inset 0 0 85px rgba(0,0,0,0.72), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.squad-pitch-surface::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 42%, rgba(3,7,18,0.55) 100%),
        linear-gradient(115deg, transparent 0 44%, rgba(255,255,255,0.08) 48%, transparent 56%);
    pointer-events: none;
}
.squad-pitch-lines { opacity: 0.86; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.22)); }
.squad-pitch-lines > div { border-color: rgba(255,255,255,0.9); }
.pitch-slot-wrapper { min-width: 68px; }
.pitch-slot {
    overflow: hidden;
    border-radius: 14px !important;
    box-shadow: 0 18px 28px rgba(2,6,23,0.38), inset 0 1px 0 rgba(255,255,255,0.12);
}
.pitch-slot-wrapper:hover .pitch-slot { transform: translateY(-1px); }
.pitch-slot.player-filled {
    background: linear-gradient(180deg, rgba(30,41,59,0.95), rgba(2,6,23,0.96));
    border-color: rgba(148,163,184,0.55) !important;
}
.pitch-slot.empty-slot {
    background: linear-gradient(180deg, rgba(15,23,42,0.48), rgba(2,6,23,0.66)) !important;
    border-color: rgba(226,232,240,0.5) !important;
    box-shadow: 0 16px 30px rgba(2,6,23,0.36), inset 0 0 26px rgba(255,255,255,0.06) !important;
}
.pitch-slot.empty-slot:hover {
    background: linear-gradient(180deg, rgba(30,41,59,0.62), rgba(15,23,42,0.78)) !important;
    border-color: rgba(255,255,255,0.9) !important;
}
.pitch-slot-label {
    max-width: 88px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}
.analysis-metric {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 14px;
    padding: 12px;
    min-height: 92px;
}
.analysis-metric span {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    min-height: 28px;
}
.analysis-metric strong {
    display: block;
    color: #f8fafc;
    font-size: 22px;
    line-height: 1;
    margin: 8px 0 10px;
}
.analysis-metric div {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.85);
}
.analysis-metric i {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #34d399);
    transition: width .35s ease;
}
.analysis-feedback-item {
    border: 1px solid rgba(51,65,85,0.9);
    background: rgba(15,23,42,0.72);
    border-radius: 12px;
    padding: 10px 12px;
}
@media (min-width: 1280px) {
    .pitch-slot-wrapper { min-width: 78px; }
}
@media (max-width: 640px) {
    .pitch-slot-wrapper { min-width: 58px; }
    .analysis-metric { min-height: 84px; padding: 10px; }
    .analysis-metric strong { font-size: 19px; }
}



/* Squad Builder refinement pass */
.squad-pitch-frame {
    isolation: isolate;
    box-shadow: 0 34px 92px rgba(2, 6, 23, 0.68), inset 0 1px 0 rgba(255,255,255,0.08);
}
.squad-pitch-frame::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 0 34px rgba(255,255,255,0.05), 0 0 42px rgba(16,185,129,0.08);
    pointer-events: none;
    z-index: 11;
}
.squad-pitch-surface {
    background-color: #145a31;
    background-image:
        radial-gradient(circle at 50% 48%, rgba(255,255,255,0.12), transparent 24%),
        linear-gradient(90deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.026) 0 1px, transparent 1px 9px),
        repeating-linear-gradient(0deg, rgba(68, 164, 82, 0.92) 0 8.2%, rgba(34, 128, 61, 0.92) 8.2% 16.4%),
        radial-gradient(ellipse at center, rgba(58, 177, 91, 0.92), rgba(13, 73, 38, 0.96) 70%),
        linear-gradient(180deg, #38a35a, #176738 54%, #0c3f25);
    background-size: auto, 24px 24px, 20px 20px, auto, auto, auto;
    box-shadow: inset 0 0 105px rgba(0,0,0,0.76), inset 0 0 0 1px rgba(255,255,255,0.23), inset 0 16px 42px rgba(255,255,255,0.08);
}
.squad-pitch-surface::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 1.2%;
    width: 28%;
    height: 5%;
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,0.28);
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 1px, transparent 1px 8px);
    box-shadow: 0 0 14px rgba(255,255,255,0.08);
    pointer-events: none;
}
.squad-pitch-lines { opacity: 0.92; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.28)); }
.squad-pitch-lines > div { border-color: rgba(255,255,255,0.86); }
.analysis-pill {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(51, 65, 85, 0.9);
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.analysis-metric {
    min-height: 66px;
    padding: 9px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.64));
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.analysis-metric span { min-height: 22px; font-size: 9.5px; color: #a7b6c9; }
.analysis-metric strong { font-size: 18px; margin: 5px 0 7px; }
.analysis-metric div { height: 5px; background: rgba(30, 41, 59, 0.86); }
.analysis-feedback-item {
    padding: 7px 9px;
    border-radius: 10px;
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(2, 6, 23, 0.56);
}
.pitch-slot.empty-slot {
    background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(15,23,42,0.46) 42%, rgba(2,6,23,0.72)) !important;
    border: 1px solid rgba(226,232,240,0.68) !important;
    outline: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 18px 34px rgba(2,6,23,0.4), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 0 28px rgba(56,189,248,0.08), 0 0 22px rgba(16,185,129,0.1) !important;
}
.pitch-slot.empty-slot::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 10px;
    border: 1px dashed rgba(255,255,255,0.28);
    background: radial-gradient(circle at 50% 32%, rgba(255,255,255,0.16), transparent 48%);
    pointer-events: none;
}
.pitch-slot.empty-slot:hover {
    background: linear-gradient(160deg, rgba(255,255,255,0.22), rgba(30,41,59,0.58) 44%, rgba(2,6,23,0.82)) !important;
    box-shadow: 0 20px 42px rgba(2,6,23,0.46), inset 0 1px 0 rgba(255,255,255,0.34), 0 0 30px rgba(52,211,153,0.2) !important;
}
.pitch-slot:has(.fa-plus):not(.border-amber-400) {
    background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(15,23,42,0.46) 42%, rgba(2,6,23,0.72)) !important;
    border: 1px solid rgba(226,232,240,0.68) !important;
}
.pitch-slot:has(.fa-plus) .fa-plus {
    color: rgba(226, 232, 240, 0.92) !important;
    text-shadow: 0 0 18px rgba(52, 211, 153, 0.42);
}
@media (min-width: 1280px) {
    .pitch-slot-wrapper { min-width: 84px; }
    .pitch-slot.player-filled, .pitch-slot.empty-slot { width: 86px !important; height: 112px !important; }
}
@media (max-width: 1024px) {
    .analysis-metric { min-height: 58px; padding: 8px; }
    .analysis-metric span { min-height: 18px; font-size: 9px; }
    .analysis-metric strong { font-size: 16px; }
}
@media (max-width: 640px) {
    .analysis-metric { min-height: 52px; }
    .analysis-metric span { font-size: 8px; min-height: 17px; }
    .analysis-metric strong { font-size: 14px; margin: 4px 0 5px; }
}

.analysis-pill.is-complete { background: rgba(16, 185, 129, 0.16); border-color: rgba(52, 211, 153, 0.42); color: #6ee7b7; }


/* Analysis card placement fix: keep the pitch clear */
.builder-analysis-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    z-index: 1;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.84));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(14px) saturate(120%);
    pointer-events: auto;
    max-height: none;
    overflow: visible;
}
.analysis-metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}
.builder-analysis-panel .analysis-metric {
    min-height: 62px;
    padding: 8px;
}
.builder-analysis-panel .analysis-metric span {
    min-height: 20px;
    font-size: 9px;
}
.builder-analysis-panel .analysis-metric strong {
    font-size: 17px;
    margin: 5px 0 6px;
}
#analysis-feedback {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
#analysis-feedback .analysis-feedback-item {
    flex: 1 1 180px;
    min-width: 0;
    padding: 7px 9px;
}
@media (max-width: 1024px) {
    .builder-analysis-panel {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        padding: 12px;
    }
    .analysis-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .builder-analysis-panel {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        max-height: none;
        overflow: visible;
    }
    .analysis-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #analysis-feedback { display: flex; flex-direction: column; }
    #analysis-feedback .analysis-feedback-item { flex-basis: auto; }
}


/* Player pool card symmetry */
.pool-player-card {
    display: block;
}
.pool-player-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.pool-player-flag {
    width: 36px;
    height: 36px;
    font-size: 18px;
}
.pool-player-info {
    min-width: 0;
    padding-right: 2px;
}
.pool-player-name {
    max-width: 100%;
    line-height: 1.15;
}
.pool-player-features {
    width: 56px;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    justify-self: end;
}
.pool-player-pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 42px;
    height: 16px;
    padding: 0 5px;
    border-radius: 6px;
    background: #fbbf24;
    color: #0f172a;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.18);
}
.pool-player-pro-badge i {
    font-size: 8px;
}
.pool-player-rating {
    width: 42px;
    height: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
@media (max-width: 640px) {
    .pool-player-row {
        grid-template-columns: 34px minmax(0, 1fr) 52px;
        gap: 8px;
    }
    .pool-player-flag {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }
    .pool-player-features {
        width: 52px;
    }
    .pool-player-rating {
        width: 40px;
        height: 32px;
    }
}


/* Player pool filters and demo note */
.pool-filter-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    overflow: visible;
    padding: 1px 1px 2px;
}
.pool-filter-btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 9px;
    background: #334155;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
    border: 1px solid rgba(71, 85, 105, 0.7);
}
.pool-filter-btn:hover {
    background: #475569;
    color: #fff;
}
.pool-filter-btn.is-active {
    background: #2563eb;
    border-color: rgba(96, 165, 250, 0.72);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.pool-filter-btn-pro {
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.34);
    background: rgba(120, 53, 15, 0.26);
}
.pool-filter-btn-pro.is-active {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: rgba(253, 230, 138, 0.72);
    color: #0f172a;
}
.pool-demo-note {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 12px;
    border-top: 1px solid rgba(51, 65, 85, 0.85);
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.72);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}
.pool-demo-note i {
    color: #fbbf24;
    font-size: 12px;
    flex: 0 0 auto;
}
@media (max-width: 640px) {
    .pool-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: none;
    }
    .pool-filter-bar::-webkit-scrollbar { display: none; }
    .pool-filter-btn {
        min-height: 31px;
        padding: 7px 9px;
        font-size: 11px;
    }
    .pool-demo-note {
        padding: 8px 12px 10px;
        font-size: 10.5px;
    }
}


/* Generic non-licensed player avatars */
.pool-player-card-pro {
    border-color: rgba(251, 191, 36, 0.36) !important;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98)) !important;
}
.pool-player-row {
    grid-template-columns: 44px minmax(0, 1fr) 56px;
}
.pool-player-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 18px rgba(2,6,23,0.22);
}
.pool-player-avatar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 18%, rgba(255,255,255,0.22), transparent 34%), linear-gradient(150deg, rgba(255,255,255,0.12), transparent 50%);
    pointer-events: none;
}
.pool-player-avatar::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 8px;
    height: 1px;
    background: rgba(255,255,255,0.28);
    box-shadow: 0 -8px 0 rgba(255,255,255,0.08);
}
.pool-player-avatar i,
.pool-player-avatar span {
    position: relative;
    z-index: 1;
}
.pool-player-avatar i {
    font-size: 17px;
    color: rgba(255,255,255,0.9);
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
}
.pool-player-avatar span {
    font-size: 8px;
    font-weight: 900;
    color: rgba(255,255,255,0.8);
    line-height: 1;
}
.pool-avatar-gk { background: linear-gradient(145deg, #0f766e, #0f172a); }
.pool-avatar-def { background: linear-gradient(145deg, #1d4ed8, #0f172a); }
.pool-avatar-mid { background: linear-gradient(145deg, #7c3aed, #0f172a); }
.pool-avatar-fwd { background: linear-gradient(145deg, #be123c, #0f172a); }
.pool-player-avatar.is-pro {
    border-color: rgba(251,191,36,0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 0 1px rgba(251,191,36,0.18), 0 12px 24px rgba(251,191,36,0.12);
}
.pool-player-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 10px;
}
.pool-player-pos,
.pool-player-country,
.pool-player-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: rgba(2, 6, 23, 0.7);
    font-weight: 800;
    line-height: 1;
}
.pool-player-pos { min-width: 32px; padding: 0 5px; color: #cbd5e1; }
.pool-player-country { min-width: 42px; padding: 0 6px; color: #cbd5e1; gap: 4px; border-color: rgba(96, 165, 250, 0.22); background: rgba(15, 23, 42, 0.9); }
.pool-player-form { width: 18px; flex: 0 0 18px; }
@media (max-width: 640px) {
    .pool-player-row { grid-template-columns: 40px minmax(0, 1fr) 52px; }
    .pool-player-avatar { width: 40px; height: 40px; border-radius: 11px; }
    .pool-player-avatar i { font-size: 16px; }
    .pool-player-meta { gap: 4px; }
}


/* Right-column compact squad analysis */
.builder-analysis-panel {
    padding: 12px;
    border-radius: 18px;
}
.analysis-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.builder-analysis-panel .analysis-metric {
    min-height: 56px;
    padding: 8px;
}
.builder-analysis-panel .analysis-metric span {
    min-height: 18px;
    font-size: 8.5px;
}
.builder-analysis-panel .analysis-metric strong {
    font-size: 16px;
    margin: 4px 0 5px;
}
#analysis-feedback .analysis-feedback-item {
    flex: 1 1 140px;
    padding: 6px 8px;
    font-size: 11px;
}
@media (max-width: 1024px) {
    .analysis-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Safe country flag badge in player cards */
.pool-player-country {
    gap: 3px;
}
.pool-country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

/* Country concept selector and clearer country badges */
.country-select-flag {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 20px rgba(2,6,23,0.2);
    font-size: 18px;
    line-height: 1;
    flex: 0 0 34px;
}
.pool-country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background: rgba(255,255,255,0.08);
    font-size: 12px;
    line-height: 1;
}
.pitch-card-country-code {
    min-width: 18px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(2, 6, 23, 0.64);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.86);
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
}


/* Squad Builder pitch image: scoped to the field surface only */
.squad-pitch-surface {
    background-color: #07111f !important;
    background-image:
        linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(2, 6, 23, 0.02) 42%, rgba(2, 6, 23, 0.16) 100%),
        url("../assets/pitch/squad11-premium-pitch.png") !important;
    background-position: center center, center center !important;
    background-size: cover, cover !important;
    background-repeat: no-repeat, no-repeat !important;
    border-color: rgba(226, 232, 240, 0.28) !important;
    box-shadow:
        inset 0 0 70px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}
.squad-pitch-surface::before {
    background:
        radial-gradient(ellipse at center, transparent 48%, rgba(2, 6, 23, 0.3) 100%) !important;
}
.squad-pitch-surface::after {
    display: none !important;
}
.squad-pitch-lines {
    opacity: 0.16 !important;
}
