/**
 * WOF Fantasy League Pro - Elite Tactical Board
 * Ultra High-End "Ultimate Team" Design - FINAL POLISHED & RESTORED
 */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,700;0,900;1,700&family=Montserrat:wght@400;700;900&display=swap');

:root {
    --gold: #f0c040;
    --gold-glow: rgba(240, 192, 64, 0.6);
    --epic: #a335ee;
    --epic-glow: rgba(163, 53, 238, 0.6);
    --common: #4a4a6e;
    --bg-dark: #0a0a14;
    --bg-card: #161625;
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* --- GUEST MODE & LOGIN OVERLAY --- */
.wof-fantasy-container.wof-guest-mode {
    position: relative;
    overflow: hidden;
}

.wof-guest-mode .wof-market-column,
.wof-guest-mode .wof-field-column {
    filter: blur(12px) grayscale(0.5);
    pointer-events: none;
    user-select: none;
    transition: all 0.5s ease;
}

.wof-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.4);
    backdrop-filter: blur(2px);
    padding: 40px;
}

.wof-login-content {
    max-width: 500px;
    width: 100%;
    padding: 50px 40px;
    text-align: center;
    border: 2px solid var(--gold);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(240, 192, 64, 0.1);
    animation: loginFadeUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wof-login-icon {
    font-size: 60px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(240, 192, 64, 0.4));
}

.wof-login-content h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.wof-login-content p {
    color: #8a8aae;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 35px;
}

.wof-login-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.wof-login-actions .btn {
    padding: 14px 30px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.wof-login-actions .btn-primary {
    background: var(--gold);
    color: #000;
    box-shadow: 0 5px 15px rgba(240, 192, 64, 0.3);
}

.wof-login-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
}

.wof-login-actions .btn-primary:hover {
    background: #fff;
    color: #000 !important;
}

.wof-login-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
    border-color: var(--gold);
}

.wof-login-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.wof-login-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-item span {
    font-size: 18px;
    background: rgba(240, 192, 64, 0.1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* --- ELITE LEADERBOARD & HISTORY STYLES --- */
.wof-fantasy-leaderboard.elite-leaderboard,
.wof-fantasy-history.elite-history {
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.wof-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.leaderboard-header .header-icon {
    font-size: 40px;
    background: rgba(240, 192, 64, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.elite-title {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    color: var(--gold) !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.elite-subtitle {
    color: #8a8aae;
    font-size: 13px;
    margin: 5px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* User Rank Hero */
.wof-rank-hero {
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.15) 0%, rgba(10, 10, 20, 0.4) 100%);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.wof-rank-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: relative;
    z-index: 2;
}

.rank-divider {
    width: 1px;
    height: 50px;
    background: rgba(240, 192, 64, 0.2);
}

.wof-rank-hero-label {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.wof-rank-hero-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    margin: 0;
}

/* Elite Table */
.elite-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.elite-table th {
    background: transparent;
    border: none;
    color: #8a8aae;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 20px;
    letter-spacing: 1px;
}

.elite-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.elite-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
}

.elite-table td {
    padding: 15px 20px;
    border: none;
    vertical-align: middle;
}

.elite-table tr td:first-child { border-radius: 10px 0 0 10px; border-left: 2px solid transparent; }
.elite-table tr td:last-child { border-radius: 0 10px 10px 0; }

.elite-table tr.rank-top-1 { background: linear-gradient(90deg, rgba(240, 192, 64, 0.1), rgba(255,255,255,0.02)); }
.elite-table tr.rank-top-1 td:first-child { border-left-color: var(--gold); }

.rank-badge {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    font-family: 'Barlow Condensed', sans-serif;
}

.rank-top-1 .rank-badge { background: var(--gold); color: #000; box-shadow: 0 0 15px rgba(240, 192, 64, 0.4); }
.rank-top-2 .rank-badge { background: #c0c0c0; color: #000; }
.rank-top-3 .rank-badge { background: #cd7f32; color: #000; }

.wof-manager-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.manager-avatar img {
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    padding: 2px;
}

.manager-link {
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.manager-link:hover {
    color: var(--gold) !important;
}

.points-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    text-align: right;
}

.points-value.highlight {
    color: var(--gold);
}

/* GW Winner Hero */
.gw-winner-hero {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(240, 192, 64, 0.2) 0%, transparent 100%);
    border: 1px solid rgba(240, 192, 64, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    gap: 25px;
    animation: winnerPulse 2s infinite ease-in-out;
}

@keyframes winnerPulse {
    0% { box-shadow: 0 0 0 0 rgba(240, 192, 64, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(240, 192, 64, 0); }
    100% { box-shadow: 0 0 0 0 rgba(240, 192, 64, 0); }
}

.winner-crown { font-size: 40px; }
.winner-label { display: block; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.winner-name { margin: 0; color: #fff; font-family: 'Barlow Condensed'; font-size: 28px; }
.winner-score { margin-left: auto; text-align: right; }
.winner-value { margin: 0; color: var(--gold); font-family: 'Barlow Condensed'; font-size: 32px; }

/* Selector Styling */
.glass-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--gold) !important;
    color: var(--gold) !important;
    padding: 8px 15px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    cursor: pointer;
    outline: none;
}

/* --- ELITE PAGINATION --- */
.wof-pagination.elite-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.elite-pagination .page-link {
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.elite-pagination .page-link:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 15px rgba(240, 192, 64, 0.4);
    transform: translateY(-2px);
}

.elite-pagination .page-info {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #8a8aae;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wof-dark-mode {
    background: var(--bg-dark);
    color: #fff;
    display: flex;
    gap: 30px;
    padding: 30px;
    font-family: 'Montserrat', sans-serif;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.9);
    max-width: 1400px;
    margin: 0 auto;
}

/* --- MARKET COLUMN --- */
.wof-market-column {
    flex: 0 0 380px;
    background: #11111e;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    max-height: 900px;
    display: flex;
    flex-direction: column;
}

/* --- DEADLINE UI RESTORED --- */
#wof-deadline-container {
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.15) 0%, rgba(0,0,0,0.6) 100%);
    border-radius: 12px;
    border: 1px solid var(--gold);
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

#wof-deadline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 192, 64, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.wof-deadline-active {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wof-deadline-active .label {
    font-size: 10px;
    font-weight: 900;
    color: #8a8aae;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wof-deadline-active .time {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(240, 192, 64, 0.5);
    animation: timerPulse 1.5s infinite ease-in-out;
    display: block;
    margin-top: 2px;
}

@keyframes timerPulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; text-shadow: 0 0 30px rgba(240, 192, 64, 0.8); }
    100% { transform: scale(1); opacity: 0.9; }
}

.wof-profit-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}
.wof-profit-tracker .label { font-size: 10px; font-weight: 900; color: #8a8aae; }
.wof-profit-tracker .value { font-size: 14px; font-weight: 900; color: #fff; }

/* --- BUDGET & FILTERS --- */
.wof-budget-container {
    background: rgba(0,0,0,0.5);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(240, 192, 64, 0.15);
}

.wof-budget-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.wof-budget-label { font-size: 9px; letter-spacing: 1px; color: #8a8aae; font-weight: 900; text-transform: uppercase; }
#wof-current-budget { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 900; color: var(--gold); }

.wof-budget-bar-bg { height: 6px; background: rgba(255,255,255,0.05); border-radius: 10px; overflow: hidden; }
#wof-budget-fill { height: 100%; background: var(--gold); transition: width 0.6s ease; box-shadow: 0 0 15px var(--gold-glow); }

#wof-player-search {
    width: 100%; background: #0a0a14; border: 1px solid var(--glass-border);
    padding: 8px 12px; color: #fff; border-radius: 8px; font-size: 13px; margin-bottom: 12px;
}

.wof-pos-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.filter-btn {
    flex: 1; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    color: #8a8aae; padding: 6px; border-radius: 6px; font-weight: 900; font-size: 10px; cursor: pointer; transition: 0.3s;
}
.filter-btn.active { background: var(--gold); color: #000; border-color: var(--gold); box-shadow: 0 4px 10px rgba(240, 192, 64, 0.2); }

.wof-pro-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
#wof-club-filter,
.wof-sort-filters select { 
    width: 100%; 
    background: #0a0a14; 
    border: 1px solid var(--gold); 
    color: #fff; 
    padding: 8px; 
    border-radius: 8px; 
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0c040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    transition: all 0.3s ease;
}

#wof-club-filter:hover,
.wof-sort-filters select:hover {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.2);
}

.wof-price-filter-row { background: rgba(255,255,255,0.02); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--glass-border); }
.wof-price-filter-row label { display: flex; justify-content: space-between; font-size: 10px; font-weight: 900; color: #8a8aae; margin-bottom: 8px; }
#wof-price-filter { width: 100%; cursor: pointer; }

.wof-gw-indicator {
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    padding: 4px;
    border-radius: 6px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

/* --- PLAYER CARDS IN MARKET --- */
#wof-player-list { flex: 1; overflow-y: auto; padding-right: 8px; }
#wof-player-list::-webkit-scrollbar { width: 4px; }
#wof-player-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

.wof-player-card {
    background: linear-gradient(145deg, #1a1a2e 0%, #11111e 100%);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    min-height: 65px;
}

.wof-player-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(240, 192, 64, 0.15);
}

.most-wanted-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ff4d4d, #ff9800);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 5;
}

.fire-effect {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 16px;
    z-index: 5;
    animation: fireFlicker 1.5s infinite alternate;
}

@keyframes fireFlicker {
    0% { transform: scale(1) rotate(-5deg); opacity: 0.8; }
    50% { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(-5deg); opacity: 0.8; }
}

.player-thumb { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--gold); padding: 2px; background: #000; flex-shrink: 0; }
.player-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.player-pos {
    font-size: 10px;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-price-block { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; text-align: right; flex-shrink: 0; }
.player-value { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 20px; color: var(--gold); }
.player-points-badge { background: rgba(240, 192, 64, 0.1); color: var(--gold); border: 1px solid rgba(240, 192, 64, 0.3); font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; }

.info-icon { 
    position: absolute; 
    top: -5px; 
    left: -5px; 
    font-size: 12px; 
    color: var(--gold); 
    z-index: 20; 
    cursor: pointer;
    background: #000; 
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid var(--gold);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.info-icon:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.2);
}

/* --- QUICK SWAP BUTTON --- */
.swap-player {
    position: absolute;
    top: -10px;
    right: 22px;
    background: var(--epic);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    border: 2px solid #111;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.swap-player:hover {
    transform: scale(1.2);
    background: #fff;
    color: var(--epic);
}

/* --- FIELD COLUMN RESTORED --- */
.wof-field-column { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    min-width: 800px;
}

.wof-soccer-field {
    background: #0d130d !important;
    border: 3px solid var(--gold) !important;
    height: 600px !important;
    position: relative !important;
    border-radius: 15px;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(240, 192, 64, 0.05) 0%, transparent 80%),
        url('../images/fantasyleaguelogo.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 220px !important;
    z-index: 1;
    overflow: hidden !important; /* Changed to hidden for spotlights/particles */
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
    perspective: 1000px; /* For 3D effects */
}

/* --- STADIUM ATMOSPHERE --- */
.wof-spotlight {
    position: absolute;
    top: -20%;
    width: 40%;
    height: 140%;
    background: radial-gradient(ellipse at center, rgba(240, 192, 64, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(30px);
    animation: spotlightMove 8s infinite alternate ease-in-out;
}

.wof-spotlight-1 { left: -10%; animation-delay: 0s; }
.wof-spotlight-2 { right: -10%; animation-delay: -4s; }

@keyframes spotlightMove {
    0% { transform: rotate(-15deg) translateX(-10%); }
    100% { transform: rotate(15deg) translateX(10%); }
}

.grass-particle {
    position: absolute;
    width: 2px;
    height: 6px;
    background: rgba(100, 255, 100, 0.3);
    pointer-events: none;
    z-index: 2;
    border-radius: 2px;
    animation: floatGrass 4s infinite linear;
}

@keyframes floatGrass {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* --- 3D TILT & SHINE --- */
.wof-player-card, .slot.occupied {
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
    overflow: visible !important; /* Allow icons to overflow if needed */
    transition: transform 0.1s ease-out;
}

/* Move hover shine to the player face so it doesn't cover icons */
.wof-player-card::after, .slot.occupied .player-card-face::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(135deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.05) 75%,
        rgba(255,255,255,0) 100%);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1; /* Below icons */
    opacity: 0;
    transition: opacity 0.3s;
    transform: translate(var(--shine-x, 0), var(--shine-y, 0));
    border-radius: 10px; /* Match card radius */
}

.wof-player-card:hover::after, .slot.occupied:hover .player-card-face::after {
    opacity: 1;
}

/* Ensure player-card-face has position relative for the after element */
.player-card-face {
    position: relative;
    overflow: hidden;
    z-index: 2;
    border-radius: 10px;
}

.slot .info-icon, .slot .remove-player, .slot .swap-player, .slot .captain-badge {
    z-index: 20 !important; /* Force icons above everything */
}
.card-reflection {
    display: none; /* Replaced by ::after rainbow shine */
}

/* --- SIGNING ANIMATION --- */
.just-signed {
    animation: signExplosion 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    z-index: 100 !important;
}

.just-signed::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: particleBlast 0.8s ease-out forwards;
    box-shadow: 0 0 20px var(--gold), 0 0 40px var(--epic);
    pointer-events: none;
}

@keyframes signExplosion {
    0% { transform: scale(0.5) rotate(-10deg); opacity: 0; filter: brightness(3); }
    50% { transform: scale(1.1) rotate(5deg); filter: brightness(1.5); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; filter: brightness(1); }
}

@keyframes particleBlast {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 300px; height: 300px; opacity: 0; border: 2px solid var(--epic); }
}

/* Pitch Markings - Elite style */
.pitch-marking { position: absolute; border: 1px solid rgba(255, 255, 255, 0.1); pointer-events: none; }
.center-circle { top: 50%; left: 50%; width: 140px; height: 140px; border-radius: 50%; transform: translate(-50%, -50%); border-width: 2px; }
.center-line { top: 50%; left: 0; right: 0; height: 1px; background: rgba(255, 255, 255, 0.1); border: none; }
.penalty-area-top { top: -1px; left: 50%; width: 260px; height: 100px; border-top: none; transform: translateX(-50%); }
.penalty-area-bottom { bottom: -1px; left: 50%; width: 260px; height: 100px; border-bottom: none; transform: translateX(-50%); }

/* Slots - Strategic Positioning for 5v5 RESTORED */
.slot {
    width: 100px !important; height: 135px !important; border-radius: 12px;
    border: 2px dashed rgba(240, 192, 64, 0.2);
    position: absolute !important; background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center; transition: 0.4s; z-index: 10;
}
.slot:hover { border-color: var(--gold); background: rgba(240, 192, 64, 0.1); transform: scale(1.05) translateX(-50%); }

/* Coordinate Fixes for Wide Field */
.slot.gk { bottom: 5% !important; left: 50% !important; transform: translateX(-50%) !important; }
.slot.def-1 { bottom: 35% !important; left: 28% !important; transform: translateX(-50%) !important; }
.slot.def-2 { bottom: 35% !important; left: 72% !important; transform: translateX(-50%) !important; }
.slot.atk-1 { top: 15% !important; left: 28% !important; transform: translateX(-50%) !important; }
.slot.atk-2 { top: 15% !important; left: 72% !important; transform: translateX(-50%) !important; }

.wof-bench {
    display: flex; justify-content: center; gap: 20px; background: rgba(255,255,255,0.02);
    padding: 20px; border-radius: 15px; border: 1px solid var(--glass-border);
}
.wof-bench .slot { position: relative !important; width: 85px !important; height: 115px !important; transform: none !important; left: auto !important; bottom: auto !important; top: auto !important; }

/* Slot Inner Card Styles */
.player-in-slot { width: 100%; height: 100%; position: relative; }
.player-card-face { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 10px; text-align: center; }
.slot-thumb { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--glass-border); margin-bottom: 8px; background: #000; }
.slot-name { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 900; text-transform: uppercase; color: #fff; margin-bottom: 4px; }
.slot-val { font-size: 11px; font-weight: 900; color: var(--gold); background: rgba(0,0,0,0.6); padding: 2px 8px; border-radius: 4px; }

/* Control Badges */
.remove-player {
    position: absolute; top: -10px; right: -10px; background: #ff4d4d; color: #fff;
    width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 14px; font-weight: 900; cursor: pointer; 
    border: 2px solid #111; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.captain-badge {
    position: absolute; top: -10px; left: -10px; background: var(--gold); color: #000;
    width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 900; border: 2px solid #111;
    z-index: 100; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* --- TIER GLOW ANIMATIONS RESTORED & ENHANCED --- */
.tier-legendary {
    border: 2px solid var(--gold) !important;
    animation: goldGlow 3s infinite alternate !important;
    box-shadow: 0 0 20px var(--gold-glow);
    position: relative;
    overflow: visible !important;
}

@keyframes goldGlow {
    from { box-shadow: 0 0 10px var(--gold-glow); border-color: rgba(240, 192, 64, 0.5); }
    to { box-shadow: 0 0 40px var(--gold-glow); border-color: var(--gold); }
}

.tier-legendary .player-card-face::after {
    content: "";
    position: absolute;
    top: -110%;
    left: -210%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transform: rotate(30deg);
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 1%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.6) 70%,
        rgba(255, 255, 255, 0.03) 99%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: combinedShine 4s infinite;
    z-index: 1;
    pointer-events: none;
}

.tier-epic {
    border: 2px solid var(--epic) !important;
    animation: epicGlow 4s infinite alternate !important;
    box-shadow: 0 0 15px var(--epic-glow);
    position: relative;
    overflow: visible !important;
}

@keyframes epicGlow {
    from { box-shadow: 0 0 8px var(--epic-glow); border-color: rgba(163, 53, 238, 0.5); }
    to { box-shadow: 0 0 30px var(--epic-glow); border-color: var(--epic); }
}

.tier-epic .player-card-face::after {
    content: "";
    position: absolute;
    top: -110%;
    left: -210%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transform: rotate(30deg);
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 1%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        rgba(255, 255, 255, 0.03) 99%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: combinedShine 5s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes combinedShine {
    0% { top: -110%; left: -210%; opacity: 0; }
    10% { opacity: 0.5; }
    20% { top: 110%; left: 110%; opacity: 0; }
    100% { top: 110%; left: 110%; opacity: 0; }
}

/* --- FREE TRANSFERS UI UPGRADE --- */
#wof-transfer-counter {
    background: linear-gradient(135deg, #1a1a2e 0%, rgba(240, 192, 64, 0.1) 100%) !important;
    border: 1px solid var(--gold) !important;
    padding: 12px 25px !important;
    border-radius: 50px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

#wof-transfer-counter .count {
    color: var(--gold);
    font-size: 14px;
    background: rgba(0,0,0,0.3);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid var(--gold);
}

#wof-wildcard-btn {
    background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 100%);
    color: var(--gold);
    padding: 10px 22px;
    border: 2px solid var(--gold);
    border-radius: 50px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(240, 192, 64, 0.2);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

#wof-wildcard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 192, 64, 0.4);
    background: linear-gradient(135deg, #1a1a2e 0%, #0a0a14 100%);
}

#wof-wildcard-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(240, 192, 64, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    pointer-events: none;
}

#wof-wildcard-btn:hover::before {
    left: 100%;
}

#wof-wildcard-btn.active {
    background: var(--gold);
    color: #0a0a14;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(240, 192, 64, 0.8);
    animation: wildcardPulse 2s infinite;
}

#wof-wildcard-btn.active .wof-token-icon {
    background: #0a0a14;
    color: var(--gold);
    border-color: #fff;
}

/* Golden Token Icon CSS */
.wof-token-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f0c040 0%, #b8860b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a14;
    font-weight: 900;
    font-size: 18px;
    border: 2px solid #ffd700;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 2px 5px rgba(0,0,0,0.3);
    text-shadow: none;
    flex-shrink: 0;
}

@keyframes wildcardPulse {
    0% { transform: translateY(-3px) scale(1); box-shadow: 0 0 15px rgba(240, 192, 64, 0.4); }
    50% { transform: translateY(-3px) scale(1.05); box-shadow: 0 0 35px rgba(240, 192, 64, 0.8); }
    100% { transform: translateY(-3px) scale(1); box-shadow: 0 0 15px rgba(240, 192, 64, 0.4); }
}

.wildcard-active-text {
    color: var(--gold) !important;
    text-shadow: 0 0 10px rgba(240, 192, 64, 0.5);
}

/* --- FOOTER & BUTTONS --- */
.wof-footer-actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 20px; }

#wof-save-btn {
    width: 100%; 
    max-width: 450px; 
    background: var(--gold); 
    color: #000; 
    padding: 22px;
    border: none; 
    border-radius: 15px; 
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900; 
    font-size: 26px; 
    cursor: pointer; 
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(240, 192, 64, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#wof-save-btn:hover { 
    background: #fff; 
    transform: translateY(-5px); 
    box-shadow: 0 15px 40px rgba(240, 192, 64, 0.5); 
}

#wof-save-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 4s infinite;
}

/* --- FIELD INFO ICON POSITIONING --- */
.slot .info-icon.field-info {
    top: auto !important;
    right: auto !important;
    bottom: -8px !important;
    left: -8px !important;
    background: #000 !important;
    border: 2px solid var(--gold) !important;
    width: 22px !important;
    height: 22px !important;
    font-size: 13px !important;
}

/* Ensure Captain state is visually strong */
.slot.is-captain {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 35px rgba(255, 77, 77, 0.7) !important;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.15) 0%, rgba(26, 26, 46, 1) 100%) !important;
}

.slot.is-captain .captain-badge {
    background: #fff !important;
    color: #ff4d4d !important;
    border-color: #ff4d4d !important;
    transform: scale(1.1);
}

/* --- PLAYER STATS MODAL --- */
.wof-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px);
    z-index: 10000; display: flex; align-items: center; justify-content: center;
}

.wof-modal-content {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 600px; background: var(--bg-card);
    border: 1px solid var(--gold); border-radius: 20px; padding: 35px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.9), 0 0 30px var(--gold-glow);
    z-index: 10001; max-height: 90vh; overflow-y: auto;
}

.wof-modal-close {
    position: absolute; top: 20px; right: 25px; font-size: 35px;
    color: #8a8aae; cursor: pointer; transition: 0.3s; line-height: 1;
}
.wof-modal-close:hover { color: var(--gold); transform: rotate(90deg); }

.wof-modal-player-id-card {
    display: flex; align-items: center; gap: 25px; margin-bottom: 30px;
    background: rgba(255,255,255,0.03); padding: 25px; border-radius: 15px;
    border: 1px solid var(--glass-border);
}

#modal-player-img {
    width: 110px; height: 110px; border-radius: 50%; border: 4px solid var(--gold);
    background: #000; object-fit: cover; box-shadow: 0 0 20px var(--gold-glow);
}

#modal-player-name {
    font-family: 'Barlow Condensed', sans-serif; font-size: 36px; font-weight: 900;
    color: #fff; text-transform: uppercase; margin: 0 0 12px 0; line-height: 1;
}

.meta-pill {
    background: rgba(255,255,255,0.05); color: #fff; padding: 6px 15px;
    border-radius: 30px; font-size: 12px; font-weight: 900; border: 1px solid var(--gold);
}

.wof-modal-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 35px; }
.wof-modal-stat-box {
    background: rgba(0,0,0,0.4); padding: 25px; border-radius: 15px;
    text-align: center; border: 1px solid var(--glass-border);
}
.wof-modal-stat-box.highlight { border-color: var(--gold); background: rgba(240, 192, 64, 0.05); }
.wof-modal-stat-box .label { display: block; font-size: 11px; font-weight: 900; color: #8a8aae; text-transform: uppercase; margin-bottom: 10px; }
.wof-modal-stat-box .value { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 900; color: var(--gold); }

.breakdown-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border);
    border-radius: 15px; padding: 20px; margin-bottom: 15px; transition: 0.3s;
}
.breakdown-card:hover { border-color: var(--gold); background: rgba(255,255,255,0.05); }
.breakdown-card-opponent { font-weight: 900; color: #fff; font-size: 16px; text-transform: uppercase; }
.breakdown-card-pts { color: var(--gold); font-weight: 900; font-size: 20px; }
.breakdown-card-stats { font-size: 12px; color: #8a8aae; font-style: italic; margin-top: 8px; }

/* --- RANK HERO CARD (Personal Standings) --- */
.wof-rank-hero {
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.2) 0%, rgba(10, 10, 20, 0.8) 100%) !important;
    border: 1px solid var(--gold) !important;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(240, 192, 64, 0.1);
    position: relative;
    overflow: hidden;
    color: #fff !important;
}

.wof-rank-hero::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shine 4s infinite;
}

.wof-rank-hero-content {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

.wof-rank-hero-label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold) !important;
    margin-bottom: 8px;
}

.wof-rank-hero-value {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 48px !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 0;
    line-height: 1;
}

.wof-rank-hero-icon {
    font-size: 64px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

/* --- MANAGER'S HANDBOOK --- */
.wof-handbook-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.wof-handbook-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.wof-handbook-title::before {
    content: '📖';
    font-size: 24px;
}

.wof-points-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.wof-legend-card {
    background: linear-gradient(145deg, #1a1a2e 0%, #11111e 100%);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.wof-legend-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(240, 192, 64, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.wof-legend-card:hover {
    border-color: var(--gold);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px rgba(240, 192, 64, 0.1);
}

.wof-legend-icon {
    font-size: 32px;
    background: rgba(240, 192, 64, 0.1);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    border: 1px solid rgba(240, 192, 64, 0.2);
    flex-shrink: 0;
    box-shadow: inset 0 0 15px rgba(240, 192, 64, 0.1);
}

.wof-legend-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wof-legend-title {
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #8a8aae;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.wof-legend-value {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: var(--gold);
    line-height: 1.2;
}

.wof-legend-desc {
    display: block;
    font-size: 12px;
    color: #6a6a8e;
    margin-top: 8px;
    line-height: 1.5;
}

/* --- ELITE TABLE REDESIGN --- */
.wof-leaderboard-table,
.wof-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 20px;
}

.wof-leaderboard-table thead th,
.wof-history-table thead th {
    padding: 15px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 900;
    color: #8a8aae;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
}

.wof-leaderboard-table tbody tr,
.wof-history-table tbody tr {
    background: var(--bg-card);
    transition: 0.3s;
}

.wof-leaderboard-table tbody td,
.wof-history-table tbody td {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.wof-leaderboard-table tbody td:first-child,
.wof-history-table tbody td:first-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 15px 0 0 15px;
}

.wof-leaderboard-table tbody td:last-child,
.wof-history-table tbody td:last-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 15px 15px 0;
}

.wof-leaderboard-table tbody tr:hover,
.wof-history-table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.wof-leaderboard-table tbody tr:hover td,
.wof-history-table tbody tr:hover td {
    border-color: var(--gold);
}

.wof-leaderboard-table a,
.wof-history-table a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.wof-leaderboard-table a:hover,
.wof-history-table a:hover {
    color: var(--gold);
}

.wof-leaderboard-title,
.wof-history-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.wof-leaderboard-title::before,
.wof-history-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gold);
    border-radius: 2px;
}
