--- /dev/null
body { margin: 0; padding: 0; background: #0a0a0a; font-family: 'Segoe UI', sans-serif; color: #fff; height: 100vh; overflow: hidden; }

/* Contenedor a Pantalla Completa con el Fondo del Estadio Integrado */
.fantasy-container { 
    width: 100vw; height: 100vh; 
    background-color: #0a0f12; 
    background-image: url('../world/assets/images/ui/fondo_estadio.jpg');
    background-size: cover; background-position: center center;
    display: flex; flex-direction: column; overflow: hidden; 
}

/* =========================================================
   HUD FLOTANTE (TOP BAR INVISIBLE)
   ========================================================= */
.f-floating-top { position: absolute; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; padding: 15px 30px; box-sizing: border-box; z-index: 100; pointer-events: none; flex-wrap: wrap; gap: 15px; }
.f-floating-top > * { pointer-events: auto; }
.f-top-left { display: flex; gap: 5px; background: rgba(10,15,20,0.8); padding: 6px; border-radius: 30px; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.f-nav-btn { background: transparent; color: #aaa; border: none; padding: 8px 18px; border-radius: 20px; font-weight: bold; font-size: 0.95rem; cursor: pointer; transition: 0.2s; text-transform: uppercase; }
.f-nav-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.f-nav-btn.active { color: #000; background: linear-gradient(135deg, #ffd700, #ffb300); box-shadow: 0 0 15px rgba(255,215,0,0.4); text-shadow: none; }
.f-top-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.f-stat-pill { background: rgba(10,15,20,0.85); border: 1px solid rgba(255,215,0,0.3); color: #fff; padding: 8px 16px; border-radius: 20px; font-weight: bold; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); backdrop-filter: blur(8px); }
.f-close-btn { background: rgba(220,53,69,0.9); color: #fff; border: 1px solid #ff6b7b; width: 36px; height: 36px; border-radius: 50%; font-weight: bold; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.f-close-btn:hover { background: #dc3545; transform: scale(1.1); box-shadow: 0 0 15px rgba(220,53,69,0.7); }

/* Cuerpo Principal */
.fantasy-body { flex: 1; padding: clamp(80px, 12vh, 100px) clamp(15px, 3vw, 40px) 15px clamp(15px, 3vw, 40px); display: flex; overflow: hidden; box-sizing: border-box; }
.f-tab-content { width: 100%; height: 100%; }
.f-tab-content.active { display: flex; justify-content: space-between; gap: 20px; }

/* =========================================================
   EL CAMPO DE FÚTBOL (PITCH)
   ========================================================= */
.fantasy-pitch-wrapper { flex: 3; display: flex; justify-content: center; align-items: center; position: relative; min-width: 0; }

.f-pitch {
    width: 100%; height: 100%;
    /* Campo transparente sin bordes que corten las cartas */
    position: relative; display: flex; flex-direction: column; justify-content: space-evenly;
    padding: clamp(10px, 2vh, 30px) 0; box-sizing: border-box;
    z-index: 5;
}

/* HUD FLOTANTE DENTRO DEL CAMPO */
.f-pitch-hud {
    position: absolute; top: 15px; left: 20px; right: 20px;
    display: flex; justify-content: space-between; z-index: 5; pointer-events: none;
}
.f-hud-item {
    background: rgba(0,0,0,0.7); border: 1px solid rgba(255,215,0,0.4);
    padding: 8px 15px; border-radius: 8px; display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); backdrop-filter: blur(5px);
}
.f-hud-title { font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.f-hud-val { font-size: 24px; font-weight: bold; color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,0.4); }

/* Estrellas HUD (Tipo FIFA) */
.f-hud-stars-container {
    position: relative; display: inline-block; font-size: 14px;
    color: rgba(255,255,255,0.2); letter-spacing: 2px; margin-top: 5px;
}
.f-hud-stars-fill {
    position: absolute; top: 0; left: 0; white-space: nowrap; overflow: hidden;
    color: #ffd700; width: 0%; transition: width 0.5s ease;
    text-shadow: 0 0 8px rgba(255,215,0,0.8);
}

/* =========================================================
   CARTAS Y FORMACIÓN
   ========================================================= */
.f-row { display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 2vw, 25px); z-index: 10; position: relative; }

.f-card-slot {
    width: clamp(60px, min(10vw, 12vh), 115px); aspect-ratio: 2 / 3; height: auto;
    position: relative; flex-shrink: 0;
    background-color: transparent;
    display: flex; justify-content: center; align-items: center; cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.8));
    border: 2px solid transparent; border-radius: 10px;
}

/* El Marco de la carta (Se dibuja POR ENCIMA de la foto del jugador) */
.f-card-slot::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../world/assets/images/ui/carta_comun.png');
    background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
    z-index: 5; pointer-events: none;
}
.f-card-slot:hover { border-color: rgba(255,215,0,0.5); transform: translateY(-8px) scale(1.08); filter: drop-shadow(0 15px 25px rgba(255,215,0,0.5)); z-index: 20; }
.f-card-slot::after { content: attr(data-pos); color: rgba(255,255,255,0.2); font-weight: 900; font-size: clamp(0.9rem, 1.5vw, 1.5rem); text-transform: uppercase; letter-spacing: 2px; }
.f-card-slot.filled::after { display: none; } /* Oculta el texto DC/MC si hay jugador */

/* =========================================================
   MARCOS DINÁMICOS SEGÚN RAREZA (Se activan con JS)
   ========================================================= */
.f-card-slot[data-rarity="Común"]::before { background-image: url('../world/assets/images/ui/carta_comun.png'); }
.f-card-slot[data-rarity="Poco Común"]::before { background-image: url('../world/assets/images/ui/carta_poco_comun.png'); }
.f-card-slot[data-rarity="Rara"]::before { background-image: url('../world/assets/images/ui/carta_rara.png'); }
.f-card-slot[data-rarity="Épica"]::before { background-image: url('../world/assets/images/ui/carta_epica.png'); }
.f-card-slot[data-rarity="Legendaria"]::before { background-image: url('../world/assets/images/ui/carta_legendaria.png'); }

/* Textos e imagen del jugador inyectados por JS */
.f-card-rating { position: absolute; top: 12%; left: 15%; font-size: clamp(0.9rem, 1.5vw, 1.4rem); font-weight: 900; color: #fff; text-shadow: 1px 1px 3px #000; z-index: 7; }
.f-card-pos { position: absolute; top: 29%; left: 15%; font-size: clamp(0.5rem, 0.8vw, 0.8rem); font-weight: bold; color: #ffd700; text-shadow: 1px 1px 3px #000; z-index: 7; }
.f-card-name { position: absolute; bottom: 14%; width: 100%; text-align: center; font-size: clamp(0.45rem, 0.7vw, 0.65rem); font-weight: bold; color: #fff; text-shadow: 1px 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; box-sizing: border-box; z-index: 7; line-height: 1; }
.f-card-portrait { position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%); width: 95%; height: 75%; object-fit: contain; object-position: bottom center; z-index: 6; border: none; background: transparent; }

/* Curvatura táctica automática y adaptable */
.f-card-slot[data-pos="ei"], .f-card-slot[data-pos="ed"],
.f-card-slot[data-pos="mi"], .f-card-slot[data-pos="md"],
.f-card-slot[data-pos="car1"], .f-card-slot[data-pos="car2"],
.f-card-slot[data-pos="mc1"], .f-card-slot[data-pos="mc2"], .f-card-slot[data-pos="mc"],
.f-card-slot[data-pos="mcd"], .f-card-slot[data-pos="mcd1"], .f-card-slot[data-pos="mcd2"],
.f-card-slot[data-pos="dfc1"], .f-card-slot[data-pos="dfc2"], .f-card-slot[data-pos="dfc3"] {
    margin-top: clamp(8px, 3vh, 25px);
}
.f-card-slot[data-pos="por"] { margin-top: -15px; }

/* =========================================================
   PANELES LATERALES (IZQ: Banquillo | DER: Detalles)
   ========================================================= */
.fantasy-sidebar-left, .fantasy-sidebar-right { 
    flex: 1; min-width: 200px; max-width: 280px; 
    display: flex; flex-direction: column; gap: 20px; 
}

/* =========================================================
   PANELES LATERALES (ESTILO AAA)
   ========================================================= */
.f-panel {
    background: linear-gradient(180deg, rgba(20,25,35,0.9) 0%, rgba(10,15,20,0.95) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 3px solid #ffd700;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 1px 15px rgba(255,215,0,0.05);
    display: flex; flex-direction: column; overflow: hidden;
    backdrop-filter: blur(12px);
}
.f-panel-header {
    background: linear-gradient(90deg, rgba(0,0,0,0.8), rgba(40,40,50,0.6));
    padding: 12px 15px;
    font-size: 0.9rem; font-weight: 800; color: #ffd700;
    text-transform: uppercase; letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}
.f-panel-body { padding: 15px; flex: 1; overflow-y: auto; }
.f-formacion-box { flex: 0 0 auto; }
.fantasy-bench-area { flex: 1; }
.f-player-details { flex: 0 0 auto; height: fit-content; }

/* DESPLEGABLE DE FORMACIÓN ELEGANTE */
.f-styled-select {
    width: 100%; padding: 10px 15px;
    background: rgba(0,0,0,0.6);
    color: #fff; font-size: 1rem; font-weight: bold;
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 6px; appearance: none; cursor: pointer;
    outline: none; transition: all 0.3s;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffd700" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat; background-position-x: 95%; background-position-y: center;
}
.f-styled-select:hover { border-color: #ffd700; background-color: rgba(20,20,20,0.8); }
.f-styled-select:focus { border-color: #ffd700; box-shadow: 0 0 10px rgba(255,215,0,0.3), inset 0 2px 5px rgba(0,0,0,0.5); }
.f-styled-select option { background: #1a1a2e; color: #fff; }

/* =========================================================
   LISTA DE SUPLENTES (BANQUILLO)
   ========================================================= */
.f-bench-item { 
    display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 8px; padding: 8px; cursor: pointer; transition: 0.2s;
}
.f-bench-item:hover { border-color: #ffd700; background: rgba(30,30,40,0.8); transform: translateX(5px); box-shadow: -5px 0 15px rgba(0,0,0,0.5); }
.f-bench-rating { font-size: 16px; font-weight: 900; background: rgba(0,0,0,0.8); padding: 5px 8px; border-radius: 4px; border-left: 3px solid; }

/* =========================================================
   ANIMACIÓN DE SOBRES (WALKOUT)
   ========================================================= */
.f-reveal-step {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 200px; height: 200px; background: rgba(0,0,0,0.8); border: 4px solid; border-radius: 50%;
    opacity: 0; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.f-reveal-step.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* --- CINEMÁTICA DEL JUGADOR (Fondo Legendario) --- */
.f-cinematic-portrait {
    position: absolute; height: 90vh; top: 5vh; opacity: 0;
    filter: brightness(0) drop-shadow(0 0 10px rgba(255,215,0,0));
    transform: scale(0.8); transition: all 2s ease-in-out;
    z-index: 1; pointer-events: none;
}
.f-cinematic-portrait.reveal-silhouette {
    opacity: 0.3; transform: scale(0.9);
    filter: brightness(0) drop-shadow(0 0 30px rgba(255,215,0,0.8));
}
.f-cinematic-portrait.reveal-full {
    opacity: 0.6; transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 50px #ffd700);
}

/* Efectos de Rareza Épica (Chispas) */
.f-epic-spark {
    position: absolute; width: 4px; height: 20px;
    background: #ff00ff; box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    border-radius: 50%; top: 50%; left: 50%;
    animation: sparkShoot cubic-bezier(0.2, 0.8, 0.2, 1) forwards; z-index: 100;
}
@keyframes sparkShoot {
    0% { transform: translate(-50%, -50%) rotate(var(--rot)) translateY(0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(var(--rot)) translateY(-600px) scale(0); opacity: 0; }
}

/* Efectos de Rareza Legendaria (Rotura V2) */
.f-gold-shell-v2 {
    position: absolute; top: -5px; left: -5px; width: calc(100% + 10px); height: calc(100% + 10px);
    background: linear-gradient(135deg, #fff7a1 0%, #ffd700 40%, #aa7700 100%);
    border-radius: 12px; z-index: 15; box-shadow: 0 0 80px #ffd700;
    transition: all 0.5s;
}
.f-gold-shell-v2.crack-1 {
    filter: brightness(1.5); transform: scale(1.02) rotate(1deg);
    background: linear-gradient(135deg, #fff7a1 0%, #ffd700 40%, #aa7700 100%),
                radial-gradient(circle at 50% 50%, transparent 40%, rgba(0,0,0,0.5) 100%);
}
.f-gold-shell-v2.crack-2 {
    filter: brightness(2.5); transform: scale(1.05) rotate(-2deg); box-shadow: 0 0 150px #fff;
}
/* Trozos de oro rompiéndose */
.f-gold-shard {
    position: absolute; background: linear-gradient(135deg, #ffd700, #aa7700); z-index: 15;
    box-shadow: 0 0 20px #ffd700; border-radius: 5px;
}
.shard-0 { top: 0; left: 0; width: 55%; height: 55%; clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%); animation: flyTL 1.5s forwards cubic-bezier(0.1, 0.8, 0.2, 1); }
.shard-1 { top: 0; right: 0; width: 55%; height: 55%; clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%); animation: flyTR 1.5s forwards cubic-bezier(0.1, 0.8, 0.2, 1); }
.shard-2 { bottom: 0; left: 0; width: 55%; height: 55%; clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 100%); animation: flyBL 1.5s forwards cubic-bezier(0.1, 0.8, 0.2, 1); }
.shard-3 { bottom: 0; right: 0; width: 55%; height: 55%; clip-path: polygon(0 20%, 100% 0, 100% 100%, 20% 100%); animation: flyBR 1.5s forwards cubic-bezier(0.1, 0.8, 0.2, 1); }

@keyframes flyTL { to { transform: translate(-300px, -300px) rotate(-90deg); opacity: 0; } }
@keyframes flyTR { to { transform: translate(300px, -300px) rotate(90deg); opacity: 0; } }
@keyframes flyBL { to { transform: translate(-300px, 300px) rotate(-90deg); opacity: 0; } }
@keyframes flyBR { to { transform: translate(300px, 300px) rotate(90deg); opacity: 0; } }

.f-legendary-confetti {
    position: absolute; width: 8px; height: 12px; top: -20px; z-index: 100;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) rotateX(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg) rotateX(360deg); opacity: 0; }
}

/* =========================================================
   TÍTULOS MODERNOS Y TIENDA (MERCADO Y SOBRES)
   ========================================================= */
.f-section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ffaa00 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)); margin: 0; line-height: 1.2;
}
.f-section-subtitle {
    color: #a0aec0; font-size: clamp(0.85rem, 1.2vw, 1rem); margin: 5px 0 15px 0;
    letter-spacing: 0.5px; font-weight: 500;
}
.f-market-header {
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap; gap: 15px;
}
/* Reloj del Mercado */
.f-market-timer-box {
    background: rgba(0,255,204,0.1); border: 1px solid rgba(0,255,204,0.3); box-shadow: 0 0 15px rgba(0,255,204,0.1);
    padding: 8px 15px; border-radius: 8px; text-align: center; min-width: 150px;
}

/* Tarjeta de la tienda de sobres */
.f-pack-store-card {
    background: linear-gradient(145deg, rgba(20,25,35,0.9) 0%, rgba(10,15,20,0.95) 100%);
    border: 1px solid rgba(255,215,0,0.2); border-top: 3px solid #ff00ff; border-radius: 15px;
    padding: 40px; max-width: 500px; margin: 50px auto 0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 30px rgba(255,0,255,0.1);
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.f-pack-store-card:hover { transform: translateY(-5px); box-shadow: 0 25px 60px rgba(0,0,0,0.9), inset 0 0 40px rgba(255,0,255,0.2); border-color: rgba(255,215,0,0.4); }
.f-pack-icon {
    font-size: 80px; margin-bottom: 10px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(255,0,255,0.5));
    animation: packFloat 3s ease-in-out infinite;
}
@keyframes packFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Botón premium de abrir sobre */
.f-pack-btn {
    font-size: 1.2rem; padding: 15px 40px; background: linear-gradient(135deg, #ff00ff, #8a2be2); 
    color: white; border: 2px solid #ffd700; border-radius: 30px; cursor: pointer; font-weight: bold; 
    box-shadow: 0 0 20px rgba(255,0,255,0.5); transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px;
    margin-top: 10px;
}
.f-pack-btn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 0 30px rgba(255,0,255,0.8); border-color: #fff; }
.f-pack-btn:disabled { filter: grayscale(1); cursor: not-allowed; opacity: 0.7; }

/* =========================================================
   TABLA DE CLASIFICACIÓN (LA LIGA)
   ========================================================= */
.f-league-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; text-align: center; font-size: 13px; }
.f-league-table th { color: #888; text-transform: uppercase; padding: 12px 5px; font-size: 10px; font-weight: 800; letter-spacing: 1px; border-bottom: 2px solid #222; }
.f-league-table td { padding: 12px 8px; background: rgba(20, 25, 30, 0.9); border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(0,0,0,0.8); transition: transform 0.2s, background 0.2s, box-shadow 0.2s; }
.f-league-table td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; border-left: 4px solid transparent; }
.f-league-table td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.f-league-table tr:hover td { background: rgba(40, 45, 55, 0.95); transform: scale(1.01); z-index: 10; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.5); cursor: default; }

.f-team-name { text-align: left; font-weight: 900; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 10px; letter-spacing: 0.5px; }
.f-team-name span.t-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.8); }

/* Filas especiales (Champions y Descenso) */
.f-league-table tr.pos-champions td { background: linear-gradient(90deg, rgba(0, 255, 204, 0.15) 0%, rgba(20, 25, 30, 0.9) 30%); }
.f-league-table tr.pos-champions td:first-child { border-left-color: #00ffcc; color: #00ffcc; font-weight: 900; font-size: 15px; text-shadow: 0 0 10px rgba(0,255,204,0.5); }
.f-league-table tr.pos-descenso td { background: linear-gradient(90deg, rgba(255, 68, 68, 0.15) 0%, rgba(20, 25, 30, 0.9) 30%); }
.f-league-table tr.pos-descenso td:first-child { border-left-color: #ff4444; color: #ff4444; font-weight: 900; font-size: 15px; text-shadow: 0 0 10px rgba(255,68,68,0.5); }
.f-league-table tr.pos-mid td:first-child { color: #888; border-left-color: #444; font-weight: bold; }

/* Tarjetas de Partido y Detalles */
.f-match-card {
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column;
    cursor: pointer; transition: all 0.2s;
}
.f-match-card:hover { background: rgba(30,35,45,0.8); border-color: #ffd700; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.f-lineup-col { flex: 1; padding: 10px; background: rgba(0,0,0,0.4); border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); min-width: 200px; }
.f-lineup-player { font-size: 12px; color: #ddd; margin-bottom: 4px; display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 2px;}

/* =========================================================
   PERIÓDICO (EL ORÁCULO)
   ========================================================= */
.f-newspaper-container {
    display: flex; justify-content: center; width: 100%; height: 100%; overflow-y: auto; padding: 20px; box-sizing: border-box;
}
.f-newspaper {
    background: #f4ecd8; color: #2c2c2c; font-family: 'Times New Roman', Times, serif;
    padding: 30px; border-radius: 5px; max-width: 800px; width: 100%; height: fit-content;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 50px rgba(139,115,85,0.2);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}
.f-news-header { text-align: center; border-bottom: 4px double #2c2c2c; margin-bottom: 20px; padding-bottom: 10px; }
.f-news-header h1 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 900; margin: 0; letter-spacing: 2px; text-transform: uppercase; }
.f-news-meta {
    border-top: 1px solid #2c2c2c; border-bottom: 1px solid #2c2c2c; padding: 5px 0;
    font-size: 0.9rem; font-style: italic; margin-top: 10px; display: flex; justify-content: space-between; font-weight: bold;
}
.f-news-body { font-size: 1.15rem; line-height: 1.6; text-align: justify; column-count: 2; column-gap: 30px; }
.f-news-body h2 {
    column-span: all; font-size: 1.8rem; text-align: center; margin-top: 0; margin-bottom: 20px; font-weight: bold; text-transform: uppercase;
}
.f-news-body h3 {
    font-family: 'Georgia', serif; font-size: 1.2rem; border-bottom: 2px solid rgba(139,115,85,0.4); 
    margin-top: 0px; margin-bottom: 15px; padding-bottom: 5px; text-transform: uppercase; color: #5a4634; font-weight: 900;
}
.f-news-body p { margin-top: 0; margin-bottom: 15px; }
.f-news-body p:first-of-type::first-letter {
    font-size: 4rem; font-weight: bold; float: left; margin-top: -10px; margin-right: 8px; line-height: 1;
}

/* Estilos Base para Navegación Móvil de Liga */
.f-liga-subnav { display: none; }
.f-jornada-select { color:#00a8ff; background:transparent; border:none; font-size:18px; font-weight:900; text-transform:uppercase; outline:none; cursor:pointer; font-family: inherit; appearance: auto; text-align: center; }
.f-jornada-select option { background: #1a1a24; color: #fff; }

/* --- RESPONSIVIDAD (Móviles y Tablets pequeñas) --- */
@media (max-width: 1024px) {
    .f-floating-top { justify-content: center; padding: 10px; }
    .fantasy-body { padding: 120px 10px 10px 10px; overflow-y: auto; }
    .f-tab-content.active { flex-direction: column; gap: 20px; }
    .fantasy-pitch-wrapper { min-height: 50vh; }
    .fantasy-sidebar-left, .fantasy-sidebar-right { max-width: none; min-height: 300px; }
}

@media (max-width: 768px) {
    #tab-alineacion, #tab-mercado, #tab-ranking, #tab-liga { flex-direction: column !important; align-items: center !important; }
    
    /* HEADER ESTILO APP (Top Bar Integrada) */
    .f-floating-top {
        padding: 10px 0 0 0 !important;
        background: linear-gradient(180deg, rgba(15,20,25,0.98), rgba(5,10,15,0.95)) !important;
        border-bottom: 2px solid #ffd700 !important;
        box-shadow: 0 5px 20px rgba(0,0,0,0.8) !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .f-top-left {
        background: transparent !important; border: none !important; box-shadow: none !important;
        padding: 0 45px 0 10px !important; width: 100% !important; box-sizing: border-box !important;
        flex-wrap: wrap !important; gap: 5px !important;
    }
    .f-top-right {
        width: 100% !important; background: rgba(0,0,0,0.6) !important;
        padding: 6px 0 !important; border-top: 1px solid rgba(255,255,255,0.05) !important;
        justify-content: center !important; gap: 15px !important; margin: 0 !important;
    }
    .f-stat-pill { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; font-size: 11px !important; }
    .f-close-btn { position: absolute !important; top: 10px !important; right: 10px !important; width: 30px !important; height: 30px !important; font-size: 14px !important; margin: 0 !important; }
    .fantasy-body { padding-top: 130px !important; } /* Ajuste extra para que el contenido no quede oculto bajo el header */
    
    .f-nav-btn { font-size: 10px !important; padding: 6px !important; flex: 1 1 30% !important; text-align: center !important; }
    .f-pitch { width: 100% !important; min-height: 440px !important; padding: 10px 0 !important; margin-bottom: 60px !important; }
    
    /* DESPEJAR A LOS DELANTEROS MOVIENDO EL HUD A LOS LADOS */
    .f-pitch-hud { left: -60px !important; right: -60px !important; top: -5px !important; transform: scale(0.85) !important; }
    .f-row { gap: 3px !important; }
    .f-card-slot { width: 58px !important; height: 86px !important; border-width: 1px !important; }
    .f-card-portrait { width: 90% !important; height: 65% !important; bottom: 12% !important; }
    .f-card-rating { font-size: 0.75rem !important; top: 6% !important; left: 8% !important; }
    .f-card-pos { font-size: 0.45rem !important; top: 30% !important; left: 8% !important; }
    .f-card-name { font-size: 0.45rem !important; bottom: 5% !important; padding: 0 1px !important; }

    /* ESCONDER LOS PANELES ORIGINALES LATERALES */
    .fantasy-sidebar-left, .fantasy-sidebar-right { display: none !important; }

    /* EL CAJÓN DESPLEGABLE INFERIOR */
    .f-sidebar {
        position: fixed !important; bottom: -100% !important; left: 0 !important; width: 100% !important; height: 60vh !important;
        background: linear-gradient(180deg, #1a1a24, #0a0f12) !important; z-index: 1000 !important; transition: bottom 0.3s ease-out !important;
        border-top: 2px solid #ffd700 !important; border-radius: 20px 20px 0 0 !important; overflow-y: auto !important;
        padding: 25px 15px 15px 15px !important; box-shadow: 0 -10px 30px rgba(0,0,0,0.9) !important; display: block !important;
    }
    .f-sidebar.drawer-open { bottom: 60px !important; }
    #f-bench-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important; max-height: 200px !important; overflow-y: auto !important; }
    .f-drawer-close {
        position: absolute !important; top: 8px !important; left: 50% !important; transform: translateX(-50%) !important;
        width: 40px !important; height: 5px !important; background: #555 !important; border-radius: 5px !important; cursor: pointer !important;
    }
    .f-sidebar-section { display: none !important; }
    .f-sidebar-section.active { display: block !important; }
    
    /* BARRA DE NAVEGACIÓN TIPO APP (Bottom Nav) */
    .f-mobile-nav {
        display: flex; position: fixed !important; bottom: 0 !important; left: 0 !important; width: 100% !important;
        height: 60px !important; background: #0a0f12 !important; border-top: 1px solid #333 !important; z-index: 1001 !important;
        justify-content: space-around !important; align-items: center !important; padding-bottom: env(safe-area-inset-bottom) !important;
    }
    .f-mobile-nav-btn {
        background: transparent !important; border: none !important; color: #888 !important; font-size: 11px !important;
        display: flex !important; flex-direction: column !important; align-items: center !important; gap: 3px !important; cursor: pointer !important;
    }
    .f-mobile-nav-btn.active { color: #ffd700 !important; }

    /* SUB-NAVEGACIÓN DE LIGA (Clasificación vs Resultados) */
    .f-liga-subnav { display: flex !important; width: 100% !important; background: #0a0f12 !important; border-radius: 8px !important; border: 1px solid #333 !important; margin-bottom: 15px !important; }
    .f-liga-subnav button { flex: 1 !important; padding: 12px !important; background: transparent !important; color: #888 !important; border: none !important; font-weight: bold !important; cursor: pointer !important; transition: 0.3s !important; font-size: 13px !important; }
    .f-liga-subnav button.active { color: #ffd700 !important; background: rgba(255,215,0,0.1) !important; border-radius: 8px !important; }
    .mobile-hidden { display: none !important; }
    #f-liga-clasificacion, #f-liga-partidos { width: 100% !important; min-width: 100% !important; flex: none !important; }
    .f-jornada-select { background: #1a1a24 !important; border: 1px solid #00a8ff !important; padding: 10px !important; border-radius: 8px !important; width: 100% !important; font-size: 15px !important; }
    .f-match-lineups-container { flex-direction: column !important; gap: 10px !important; }

    /* OTRAS REGLAS MÓVILES */
    #f-mercado-grid { width: 100% !important; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important; gap: 10px !important; }
    .f-league-table { font-size: 10px !important; width: 100% !important; }
    .f-league-table th, .f-league-table td { padding: 6px 2px !important; }
    .f-team-name { max-width: none !important; white-space: nowrap !important; text-overflow: clip !important; overflow: visible !important; }
    #f-partidos-lista { width: 100% !important; }
    .f-match-card { padding: 10px !important; }
    .f-match-card > div > div { font-size: 11px !important; }
    #f-match-modal .modal-content { width: 95% !important; padding: 15px !important; }
    .f-lineup-col { min-width: 100% !important; margin-bottom: 15px !important; }
    #f-ranking-list { width: 100% !important; }
    #f-ranking-list > div { flex-direction: column !important; gap: 12px !important; text-align: center !important; }
    #f-ranking-list > div > div:first-child { justify-content: center !important; width: 100% !important; }
    #f-ranking-list > div > div:last-child { justify-content: space-evenly !important; width: 100% !important; border-top: 1px solid #444 !important; padding-top: 10px !important; }
    #f-ranking-list > div > div:last-child > div { border-left: none !important; padding-left: 0 !important; }
    #f-news-content { font-size: 13px !important; padding: 10px !important; }
}

@media (max-width: 400px) {
    .f-card-slot { width: 50px !important; height: 77px !important; }
    .f-card-rating { font-size: 0.65rem !important; }
    .f-card-pos { font-size: 0.4rem !important; }
    .f-card-name { font-size: 0.35rem !important; line-height: 1 !important; }
    .f-league-table { font-size: 9px !important; }
    .f-team-name { max-width: none !important; }
}
