:root {
    --bg-primary: #020617;
    --bg-secondary: #0b1528;
    --bg-elevated: #111f37;
    --bg-glass: rgba(15, 23, 42, 0.65);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-active: rgba(59, 130, 246, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.35);
    
    /* Neon accents */
    --neon-green: #10b981;
    --neon-green-glow: 0 0 15px rgba(16, 185, 129, 0.4);
    --neon-purple: #8b5cf6;
    --neon-purple-glow: 0 0 15px rgba(139, 92, 246, 0.4);
    --neon-pink: #ec4899;
    --neon-pink-glow: 0 0 15px rgba(236, 72, 153, 0.4);
    --neon-amber: #f59e0b;
    --neon-amber-glow: 0 0 15px rgba(245, 158, 11, 0.4);

    /* Rarity Glows & Gradients */
    --rarity-star: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #6366f1 100%);
    --rarity-star-glow: 0 0 25px rgba(168, 85, 247, 0.7);
    
    --rarity-gold: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #b45309 100%);
    --rarity-gold-glow: 0 0 20px rgba(245, 158, 11, 0.55);

    --rarity-silver: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 50%, #475569 100%);
    --rarity-silver-glow: 0 0 12px rgba(148, 163, 184, 0.3);

    --rarity-bronze: linear-gradient(135deg, #ea580c 0%, #7c2d12 100%);
    --rarity-bronze-glow: 0 0 8px rgba(234, 88, 12, 0.2);

    --pitch-dark: #061f12;
    --pitch-light: #0a2919;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #020617 80%);
}

/* Custom Scrollbar for premium aesthetic */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* App Layout Grid */
.app-layout {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.app-workspace {
    display: flex;
    flex: 1;
    height: calc(100vh - 76px);
    width: 100vw;
    overflow: hidden;
}

.pitch-left-area {
    display: none; /* Hidden by default on Players/Marketplace/Shop tabs */
    flex: 1;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    position: relative;
    overflow: hidden;
}

/* Show the pitch left-area only when the Field tab is active */
.app-workspace:has(#panel-tactical-field.active) .pitch-left-area {
    display: flex;
    flex: 1;
    width: 100%;
}

/* ================= TOP NAVIGATION BAR ================= */
.main-navbar {
    height: 76px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-ball {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.logo-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text .highlight {
    color: #ffd700;
    -webkit-text-fill-color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.nav-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.nav-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-tab-btn.active {
    color: #fff;
    background-color: var(--accent);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.nav-wallet-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-stats {
    display: flex;
    gap: 16px;
}

.header-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-stat .stat-label {
    font-size: 8px;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    font-weight: 800;
    text-transform: uppercase;
}

.header-stat .stat-val {
    font-size: 16px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}

.header-stat .stat-val.active-yield {
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

.btn-connect {
    background: var(--accent);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-connect:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.panel-container {
    flex: 1; /* Stretch to fill full workspace width on Players/Marketplace/Shop tabs */
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    flex-shrink: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

/* Show sidebar when tactical field is active */
.app-workspace:has(#panel-tactical-field.active) .panel-container {
    display: flex;
    width: 440px;
    flex: none;
}

.tab-panel {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    animation: panelFadeIn 0.35s ease;
}

.tab-panel.active {
    display: flex;
}

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

/* ================= TACTICAL FIELD PANEL ================= */
.field-layout-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.pitch-left-controls {
    width: 380px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-glass);
    background: rgba(11, 21, 40, 0.35);
    padding: 32px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.control-box {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.control-box h3 {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.control-box .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.yield-accumulator-card {
    background: radial-gradient(circle at top left, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.acc-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.8px;
}

.acc-amount {
    font-size: 28px;
    font-weight: 900;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.btn-claim-rewards {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 14px 20px;
    font-weight: 800;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
    width: 100%;
}

.btn-claim-rewards:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.formation-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.8px;
}

.formation-selector {
    display: flex;
    gap: 8px;
}

.form-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.form-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.form-tab.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.squad-info-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.info-row .highlight {
    color: #fff;
    font-weight: 800;
}

.status-badge {
    background: rgba(245, 158, 11, 0.08);
    color: var(--neon-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
}

.pitch-right-canvas {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    position: relative;
    overflow: hidden;
}

/* 3D Tilted Football Pitch */
.pitch-field-wrapper {
    perspective: 1200px;
    width: 95%;
    height: 95%;
    max-width: 960px;
    max-height: 640px;
    aspect-ratio: 4/3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pitch-field {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #121824;
    border: 2px solid rgba(138, 159, 194, 0.15);
    border-radius: 24px;
    transform: rotateX(8deg);
    transform-style: preserve-3d;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 100px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    background-image: 
      linear-gradient(rgba(138, 159, 194, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(138, 159, 194, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.pitch-field::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 30px rgba(59, 130, 246, 0.1);
    pointer-events: none;
    border-radius: 20px;
}

.pitch-lines {
    position: absolute;
    inset: 12px;
    pointer-events: none;
    z-index: 1;
    border: 2px solid rgba(138, 159, 194, 0.08);
}

.center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(138, 159, 194, 0.08);
    transform: translateX(-50%);
}

.center-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160px;
    height: 160px;
    border: 2px solid rgba(138, 159, 194, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.penalty-area {
    position: absolute;
    width: 260px;
    height: 100px;
    border: 2px solid rgba(138, 159, 194, 0.08);
    left: 50%;
    transform: translateX(-50%);
}

.penalty-top { top: 0; border-top: none; }
.penalty-bottom { bottom: 0; border-bottom: none; }

.squad-positions-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.pitch-slot {
    position: absolute;
    width: 15.5%;
    aspect-ratio: 2/3;
    background: rgba(23, 28, 38, 0.7);
    border: 1.5px dashed rgba(138, 159, 194, 0.25);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(4px);
}

.pitch-slot:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translate(-50%, -50%) scale(1.05);
}

.pitch-slot.active-highlight {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.25);
    border-style: solid;
}

.slot-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 800;
    margin-top: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.slot-plus {
    font-size: 26px;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
}

.pitch-slot:hover .slot-plus {
    color: var(--text-primary);
    transform: scale(1.2);
}

.pitch-slot.occupied {
    border: none;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
}

/* ================= INVENTORY PANEL ================= */
.inventory-layout-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.inventory-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-glass);
    background: rgba(11, 21, 40, 0.35);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.inventory-sidebar h3 {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 10px 12px 10px 38px;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
}

.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.tabs-row {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border-glass);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 0;
    font-size: 11px;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.rarity-row {
    display: flex;
    gap: 4px;
}

.rarity-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 2px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.rarity-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.rarity-btn.active {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.dot-all { background-color: var(--accent); }
.dot-star { background-color: #ec4899; box-shadow: 0 0 6px #ec4899; }
.dot-gold { background-color: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.dot-silver { background-color: #cbd5e1; box-shadow: 0 0 4px #cbd5e1; }
.dot-bronze { background-color: #ea580c; }

.sort-row select {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 12px;
    outline: none;
    cursor: pointer;
    font-size: 12px;
}

.filter-stats-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.filter-stats-footer .total-inventory-text {
    color: var(--text-secondary);
    font-weight: 700;
}

.inventory-grid-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
}

.inventory-grid-content .cards-grid-scroll {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

/* ================= THE HIGH-FIDELITY CUSTOM CARDS ================= */
.player-card {
    position: relative;
    background: radial-gradient(circle at center, #111d35 0%, #060a13 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    padding: 12px;
    aspect-ratio: 2/3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    user-select: none;
}

.player-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Glowing Rarity Themes */
.player-card.rarity-star-player {
    background: var(--rarity-star);
    border-color: #a855f7;
    box-shadow: var(--rarity-star-glow);
    color: #fff;
}

.player-card.rarity-gold {
    background: var(--rarity-gold);
    border-color: #fbbf24;
    box-shadow: var(--rarity-gold-glow);
    color: #2b1f00;
}
.player-card.rarity-gold .card-yield-info {
    color: #5b3f00;
}

.player-card.rarity-silver {
    background: var(--rarity-silver);
    border-color: #94a3b8;
    box-shadow: var(--rarity-silver-glow);
    color: #0f172a;
}
.player-card.rarity-silver .card-yield-info {
    color: #334155;
}

.player-card.rarity-bronze {
    background: var(--rarity-bronze);
    border-color: #ea580c;
    box-shadow: var(--rarity-bronze-glow);
    color: #ffe6bd;
}
.player-card.rarity-bronze .card-yield-info {
    color: #ffd0a3;
}

.card-header-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.pos-tag {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.rarity-tag-card {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 5px;
}

.rarity-star-player .rarity-tag-card { color: #fff; background: linear-gradient(90deg, #ec4899, #a855f7); }
.rarity-gold .rarity-tag-card { color: #000; background: #fbbf24; font-weight: 800; }
.rarity-silver .rarity-tag-card { color: #fff; background: rgba(148, 163, 184, 0.35); }
.rarity-bronze .rarity-tag-card { color: #fff; background: #ea580c; }

.player-avatar-gfx {
    height: 52%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
}

.avatar-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-glass);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.08);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-card:hover .avatar-circle {
    transform: scale(1.15) rotate(5deg);
}

.card-details {
    text-align: center;
    z-index: 2;
}

.player-name {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-yield-info {
    font-size: 11px;
    color: var(--neon-green);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.08);
    padding: 3px 6px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.card-action-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 5;
    color: transparent;
    transition: all 0.2s;
}

.player-card.is-staked .card-action-overlay {
    background: var(--neon-green);
    color: #000;
    border-color: var(--neon-green);
    box-shadow: var(--neon-green-glow);
}

/* ================= ACTION DRAWER SYSTEM ================= */
.multi-action-drawer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 80px;
    background: rgba(11, 21, 40, 0.95);
    border: 2px solid var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
}

.multi-action-drawer.active {
    transform: translateY(0);
}

.drawer-info {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-info span#selected-cards-count {
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.drawer-buttons {
    display: flex;
    gap: 12px;
}

.btn-drawer {
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-drawer:hover {
    transform: translateY(-2px);
}

.btn-drawer.burn-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-drawer.burn-btn:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-drawer.sell-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-drawer.sell-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.player-card.selected-for-action {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.45);
}

.player-card.selected-for-action::after {
    content: '✓';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ================= TRANSFER MARKETPLACE PANEL ================= */
.marketplace-panel-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 30px 40px;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    box-sizing: border-box;
    overflow: hidden;
}

.marketplace-header-bar {
    margin-bottom: 24px;
    flex-shrink: 0;
}

.marketplace-header-bar h2 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 6px 0;
}

.marketplace-header-bar p {
    font-size: 14px;
    color: var(--text-secondary);
}

.marketplace-workspace {
    display: flex;
    flex: 1;
    gap: 24px;
    overflow: hidden;
}

/* OpenSea-style filter sidebar */
.marketplace-sidebar {
    width: 280px;
    background: rgba(11, 21, 40, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.marketplace-sidebar h3 {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 10px;
}

.marketplace-listings-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    overflow-y: auto;
    padding-bottom: 40px;
}

.marketplace-card-price {
    font-size: 13px;
    color: #ffd700;
    font-weight: 800;
    margin-top: 6px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    background: rgba(255, 215, 0, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.marketplace-seller-info {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ================= PACK STORE PANEL ================= */
.store-panel-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 40px;
    overflow-y: auto;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    box-sizing: border-box;
}

.store-intro {
    text-align: center;
    margin-bottom: 40px;
}

.store-intro h2 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffd700 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
}

.store-intro p {
    font-size: 14px;
    color: var(--text-secondary);
}

.store-packs-grid {
    display: flex;
    gap: 28px;
    max-width: 1100px;
    justify-content: center;
    width: 100%;
}

.store-pack-card {
    flex: 1;
    background: radial-gradient(circle at top, #16243d 0%, #080f1d 100%);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
}

.store-pack-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.pack-badge {
    position: absolute;
    top: -12px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px var(--accent-glow);
}

.pack-badge.highlight {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.pack-visual {
    font-size: 56px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.store-pack-card:hover .pack-visual {
    transform: scale(1.1) rotate(4deg);
}

.store-pack-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.pack-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    height: 48px;
}

.pack-price {
    font-size: 24px;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.btn-buy-pack {
    width: 100%;
    background-color: var(--accent);
    border: none;
    color: white;
    padding: 12px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.25s;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-buy-pack:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5);
}

/* ================= PACK OPENING MODAL ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: radial-gradient(circle at top, #0f1c30 0%, #060b13 100%);
    border: 2px solid var(--border-glass);
    border-radius: 28px;
    padding: 40px;
    width: 95%;
    max-width: 1280px;
    height: 85%;
    max-height: 900px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-sizing: border-box;
}

.modal-close-x {
    position: absolute;
    top: 24px;
    right: 28px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    z-index: 10;
}

.modal-close-x:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-card h3 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.opened-cards-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 32px;
    flex-grow: 1;
    overflow-y: auto;
    width: 100%;
    padding: 20px;
}

.opened-cards-showcase .player-card {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes popIn {
    0% { transform: scale(0) rotate(-15deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.modal-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-shrink: 0;
}

.modal-actions button {
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ================= 3D CARD BACK & FLIP BURST ANIMATION ================= */
.card-wrapper {
    perspective: 1200px;
    width: 170px;
    height: 255px;
    position: relative;
    margin: 8px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-wrapper.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front-face, .card-back-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.card-back-face {
    z-index: 2;
    transform: rotateY(0deg);
}

.card-front-face {
    transform: rotateY(180deg);
    z-index: 1;
}

/* Gold dot-pattern card back */
.card-back {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #ffd700 0%, #b8860b 100%);
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(218, 165, 32, 0.45), inset 0 0 35px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 12px;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    user-select: none;
}

.card-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 18%, transparent 19%);
    background-size: 7px 7px;
    z-index: 1;
}

.card-back:hover {
    transform: scale(1.03);
    box-shadow: 0 14px 30px rgba(218, 165, 32, 0.65), 0 0 15px rgba(255, 215, 0, 0.3);
}

.card-back-title {
    font-size: 10px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 2;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-back-center {
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1.2px;
    z-index: 2;
    transform: rotate(-4deg);
    font-style: italic;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
}

.card-back-prompt {
    font-size: 8px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.card-back-prompt span.arrow {
    font-size: 14px;
    color: #ffd700;
    animation: bounceIndicator 0.8s infinite alternate;
}

@keyframes bounceIndicator {
    from { transform: translateY(0); }
    to { transform: translateY(4px); }
}

/* Burst explosion glow */
.burst-effect {
    position: absolute;
    inset: -35px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(245, 158, 11, 0.9) 35%, rgba(139, 92, 246, 0.6) 55%, transparent 75%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transform: scale(0.1);
    transition: transform 0.6s cubic-bezier(0.075, 0.82, 0.165, 1), opacity 0.5s ease-out;
}

.card-wrapper.bursting .burst-effect {
    opacity: 1;
    transform: scale(1.6);
}

.card-wrapper.flipped .burst-effect {
    opacity: 0 !important;
    transform: scale(0.1) !important;
    pointer-events: none !important;
    display: none !important;
}

.card-wrapper.shake {
    animation: shakeCard 0.4s ease-in-out infinite;
}

@keyframes shakeCard {
    0%, 100% { transform: rotate(0deg) translate(0, 0); }
    20% { transform: rotate(-3deg) translate(-2px, 1px); }
    40% { transform: rotate(2deg) translate(1px, -2px); }
    60% { transform: rotate(-2deg) translate(-1px, 2px); }
    80% { transform: rotate(3deg) translate(2px, -1px); }
}

/* Sizing adjustments for smaller cards inside the Pitch Slots */
.pitch-slot .player-card {
    padding: 8px 6px !important;
    border-radius: 10px !important;
    width: 100%;
    height: 100%;
}

.pitch-slot .pos-tag {
    font-size: 8px !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
}

.pitch-slot .avatar-circle {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
    box-shadow: none !important;
}

.pitch-slot .player-name {
    font-size: 10px !important;
    margin-bottom: 2px !important;
}

.pitch-slot .card-yield-info {
    font-size: 8px !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
}

/* ================= CENTRALIZED TACTICAL FIELD PANEL ================= */
.field-layout-container-central {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 24px 16px;
    overflow-y: auto;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    box-sizing: border-box;
}

.field-central-header {
    text-align: center;
    margin-bottom: 20px;
}

.field-central-header h2 {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 6px 0;
}

.field-central-header .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.field-action-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: rgba(11, 21, 40, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

.bar-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.bar-stat:last-of-type {
    border-bottom: none;
}

.bar-stat-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.bar-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.bar-stat-value.highlight-green {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-claim-rewards {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    font-weight: 800;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
}

.btn-claim-rewards:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.pitch-field-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.field-bottom-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(11, 21, 40, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}


.formation-selector-bar {
    display: flex;
    gap: 6px;
    width: 100%;
}

.formation-selector-bar .form-tab {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11px;
    text-align: center;
}

/* ================= PREMIUM REDESIGNED WEB3 HEADER STATS ================= */
.web3-stats-container {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-right: 16px;
}

.web3-stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.4) 100%);
    border: 1px solid var(--border-glass);
    padding: 8px 14px;
    border-radius: 12px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.web3-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.web3-stat-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

.web3-stat-details {
    display: flex;
    flex-direction: column;
}

.web3-stat-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.web3-stat-val {
    font-size: 13px;
    font-weight: 900;
    color: #ffd700;
}

.web3-stat-val.active-yield {
    color: var(--neon-green) !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.web3-stat-val.rewards-glow {
    color: #10b981 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.btn-claim-rewards-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    font-weight: 900;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 6px;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
}

.btn-claim-rewards-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.45);
}

.btn-claim-rewards-header:active {
    transform: translateY(0) scale(0.95);
}

/* ================= FLOATING PITCH DASHBOARDS & formation ================= */
.pitch-dashboard {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dashboard-item {
    background: rgba(11, 21, 40, 0.85);
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dash-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.dash-value {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
}

.formation-selector-fut {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(11, 21, 40, 0.85);
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.form-cycle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transition: all 0.2s;
    user-select: none;
}

.form-cycle-btn:hover {
    color: #fff;
    transform: scale(1.2);
}

.form-cycle-btn:active {
    transform: scale(0.9);
}

.current-formation-text {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    min-width: 48px;
    text-align: center;
    user-select: none;
}

/* ================= SIDEBAR PLAYER SELECTION CONTAINER ================= */
.sidebar-selection-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: var(--bg-secondary);
}

.sidebar-selection-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-selection-header h3 {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-selection-header p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.sidebar-selection-search {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-selection-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}

.sidebar-selection-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.sidebar-selection-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px;
}

.sidebar-selection-grid .player-card {
    height: 190px;
    aspect-ratio: auto;
    padding: 10px;
}

.sidebar-selection-grid .player-card .avatar-circle {
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.sidebar-selection-grid .player-card .player-avatar-gfx {
    height: 48%;
}

.sidebar-selection-grid .player-card .player-name {
    font-size: 11px;
}

.sidebar-selection-grid .player-card .card-yield-info {
    font-size: 9px;
}

/* ================= FULL RESPONSIVE MEDIA QUERIES ================= */
@media (max-width: 1024px) {
    .app-workspace {
        flex-direction: column;
        overflow-y: auto;
        height: calc(100vh - 76px);
    }

    .pitch-left-area {
        height: 60vh;
        width: 100%;
        flex: none;
        padding: 15px;
    }

    .app-workspace:has(#panel-tactical-field.active) .panel-container {
        width: 100% !important;
        height: auto;
        flex: 1;
        border-left: none;
        border-top: 1px solid var(--border-glass);
    }

    .panel-container {
        width: 100% !important;
        height: auto;
        position: relative;
        flex: 1;
    }

    .tab-panel {
        position: relative;
        height: auto;
        min-height: 400px;
    }
    
    .sidebar-selection-grid {
        max-height: 400px;
    }
    
    .pitch-slot {
        width: 17%; /* slightly larger slots on smaller screens to help tap */
    }
}

@media (max-width: 640px) {
    .web3-stats-container {
        display: none; /* hide sub-stats in navbar for mobile layout to save space */
    }
    .pitch-left-area {
        height: 50vh;
    }
    .pitch-dashboard {
        top: 12px;
        left: 12px;
        gap: 6px;
    }
    .dashboard-item {
        padding: 4px 8px;
        border-radius: 8px;
    }
    .dash-value {
        font-size: 11px;
    }
    .formation-selector-fut {
        bottom: 12px;
        right: 12px;
        padding: 4px 10px;
    }
    .form-cycle-btn {
        font-size: 18px;
        width: 20px;
        height: 20px;
    }
    .current-formation-text {
        font-size: 12px;
        min-width: 36px;
    }
    .pitch-slot {
        width: 20%;
    }
}


.btn-remove-player {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-remove-player:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-remove-player:active {
    transform: translateY(0) scale(0.97);
}

/* ================= PREMIUM BUTTON ENHANCEMENTS ================= */
.btn-connect, .btn-primary, .btn-buy-pack, .btn-drawer {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-connect:active, .btn-primary:active, .btn-buy-pack:active, .btn-drawer:active {
    transform: scale(0.96) !important;
}

/* ================= HOME PANEL STYLING ================= */
.home-panel-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 40px 60px;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    overflow-y: auto;
    box-sizing: border-box;
}

.home-hero-section {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    align-self: center;
}

.home-hero-section h1 {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-hero-section h1 .highlight {
    color: #ffd700;
    -webkit-text-fill-color: #ffd700;
}

.home-tagline {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-home-connect {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 12px;
}

.home-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    width: 100%;
}

.info-card {
    background: rgba(11, 21, 40, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.25s, border-color 0.25s;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
}

.info-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.home-token-section {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    max-width: 600px;
    align-self: center;
    width: 100%;
}

.home-token-section h3 {
    font-size: 15px;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 6px;
}

.home-token-section p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.token-ca-box {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 4px 4px 4px 12px;
    align-items: center;
    justify-content: space-between;
}

.token-ca-box code {
    font-family: monospace;
    font-size: 12px;
    color: #cbd5e1;
    word-break: break-all;
}

.btn-copy-ca {
    background: var(--accent);
    border: none;
    color: white;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-ca:hover {
    background: var(--accent-hover);
}

/* ================= DOCS PANEL STYLING ================= */
.docs-panel-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 40px 60px;
    background: radial-gradient(circle at center, #0f1c30 0%, #030712 100%);
    overflow-y: auto;
    box-sizing: border-box;
}

.docs-panel-layout h2 {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.docs-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
}

.docs-section {
    background: rgba(11, 21, 40, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.docs-section h3 {
    font-size: 16px;
    font-weight: 900;
    color: #ffd700;
    margin-bottom: 8px;
}

.docs-section p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.docs-section ul {
    margin-top: 10px;
    margin-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ================= PREMIUM CARD DESIGN (cup26.world Style) ================= */
.player-card.premium-style {
    position: relative;
    border-radius: 16px;
    padding: 12px 14px 10px 14px;
    aspect-ratio: auto;
    height: 380px; /* fixed height for alignment */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.player-card.premium-style:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Buy button container & button */
.card-buy-button-container {
    width: 100%;
    z-index: 10;
}
.btn-card-buy {
    width: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: white;
    font-weight: 800;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-card-buy:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

/* Main card content with top left meta & top right avatar */
.card-main-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 140px;
    margin-top: 4px;
    position: relative;
}

.card-left-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.card-rating {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-position {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #cbd5e1;
    text-transform: uppercase;
}

.card-flag {
    font-size: 24px;
    margin-top: 4px;
}

/* Right side avatar graphics */
.card-avatar-gfx {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 5px;
}

.card-emoji-gfx {
    font-size: 80px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.player-card.premium-style:hover .card-emoji-gfx {
    transform: scale(1.1) rotate(5deg);
}

/* Name of the player */
.card-player-name {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 850;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

.rarity-gold .card-player-name,
.rarity-gold .card-position,
.rarity-gold .card-rating,
.rarity-silver .card-player-name,
.rarity-silver .card-position,
.rarity-silver .card-rating {
    color: #000 !important;
}

.rarity-gold .card-stat-item,
.rarity-silver .card-stat-item {
    color: #1e293b !important;
}

.rarity-gold .card-stat-item strong,
.rarity-silver .card-stat-item strong {
    color: #000 !important;
}

.rarity-gold .card-stats-grid,
.rarity-silver .card-stats-grid {
    background: rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.rarity-gold .card-stat-divider,
.rarity-silver .card-stat-divider {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Stats grid */
.card-stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
}

.card-stat-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.card-stat-divider {
    width: 1px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
}

.card-stat-item {
    color: #cbd5e1;
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    font-size: 11px;
}

.card-stat-item strong {
    color: #fff;
    width: 18px;
    text-align: left;
}

/* Footer info */
.card-footer-info {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: auto;
}

.rarity-gold .card-footer-info {
    color: #5b3f00 !important;
}

.rarity-silver .card-footer-info {
    color: #334155 !important;
}

/* Marketplace filter bar styles */
.market-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    padding: 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
}

.market-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 2;
    min-width: 240px;
}

.market-search-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-glass) !important;
    color: #fff !important;
    padding: 10px 12px 10px 38px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    outline: none !important;
    transition: all 0.3s !important;
}

.market-search-wrapper input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 12px var(--accent-glow) !important;
}

.market-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 130px;
}

.market-select-wrapper select {
    width: 100%;
    appearance: none;
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: #fff !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 8px !important;
    padding: 10px 32px 10px 14px !important;
    outline: none !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}

.market-select-wrapper select:focus,
.market-select-wrapper select:hover {
    border-color: var(--accent) !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
}

.market-select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.market-counter-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 8px 0 16px 4px;
}
