/* // fc26-mundial/styles/main.css */

body {
    background-color: #020410;
    color: #F8FAFC;
    background-image: radial-gradient(circle at 50% -10%, #1e3a8a 0%, #020410 60%), linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

.pb-safe { padding-bottom: env(safe-area-inset-bottom, 20px) !important; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #020410; }
::-webkit-scrollbar-thumb { background: #2AA8FF; border-radius: 3px; }

/* NAVBAR */
.nav-container {
    background: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
}
@media (min-width: 768px) { .nav-container { padding: 0 2rem; } }

.nav-item {
    position: relative; height: 60%; display: flex; align-items: center; padding: 0 1.5rem;
    color: #94a3b8; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.3s ease;
    border-radius: 4px; cursor: pointer;
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-item.active { color: white; background: linear-gradient(180deg, rgba(42,168,255,0.1), rgba(139, 92, 246, 0.1)); border-bottom: 3px solid #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }

/* CARDS */
.match-card-new { 
    background: linear-gradient(135deg, rgba(2,4,16,0.95) 0%, rgba(15,23,42,0.95) 100%); 
    border: 1px solid rgba(255,255,255,0.08); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.match-card-new:hover { 
    transform: translateY(-5px) scale(1.02); 
    border-color: rgba(0, 240, 255, 0.3); 
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15);
    z-index: 10;
}

.owner-indicator { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 8px; font-weight: 900; margin-left: 6px; }
.ind-rog { background: rgba(42, 168, 255, 0.2); color: #2AA8FF; border: 1px solid #2AA8FF; }
.ind-arl { background: rgba(255, 74, 74, 0.2); color: #FF4A4A; border: 1px solid #FF4A4A; }

/* MATA-MATA (IDA E VOLTA) - NOVAS CLASSES */
.matchup-container {
    background: linear-gradient(to bottom, rgba(2, 4, 16, 0.4), rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.matchup-agg-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 40;
    background: #020410;
    border: 2px solid #00f0ff;
    color: white;
    padding: 4px 16px;
    border-radius: 999px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(0, 240, 255, 0.2);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* TNT TABLE */
.tnt-container {
    display: grid;
    grid-template-areas: "left left" "main right";
    grid-template-columns: 1fr 30px; 
    grid-template-rows: 40px 1fr;
    height: calc(100vh - 140px);
    background: #000212;
    border: 2px solid #3838ff;
    box-shadow: 0 0 30px rgba(0, 20, 255, 0.2);
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
}

@media (min-width: 768px) { .tnt-container { display: flex; flex-direction: row; } }

.tnt-sidebar-left {
    grid-area: left; width: 100%; height: 100%;
    background: linear-gradient(90deg, #000212 0%, #000044 100%);
    display: flex; flex-direction: row; align-items: center; justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.2); border-right: none; position: relative; overflow: hidden; z-index: 20;
}

@media (min-width: 768px) {
    .tnt-sidebar-left { width: 80px; height: 100%; background: linear-gradient(180deg, #000212 0%, #000044 100%); flex-direction: column; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.1); }
}

.tnt-vertical-text {
    writing-mode: horizontal-tb; transform: none; font-family: 'Lexend', sans-serif; font-weight: 900; font-size: 20px;
    letter-spacing: 0.1em; color: white; text-transform: uppercase; white-space: nowrap; text-shadow: 0 0 15px rgba(255,255,255,0.5);
}

@media (min-width: 768px) { .tnt-vertical-text { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 42px; } }

.tnt-main { grid-area: main; display: flex; flex-direction: column; background: #00094B; overflow-y: auto; overflow-x: hidden; }
@media (min-width: 768px) { .tnt-main { flex: 1; } }

.tnt-header {
    display: grid; grid-template-columns: 2.5rem 1fr 2rem 2rem 2.5rem;
    background: #000212; color: #a0a0ff; font-weight: 800; font-size: 11px; padding: 8px 0;
    text-transform: uppercase; position: sticky; top: 0; z-index: 10; border-bottom: 2px solid #3838ff;
}
@media (min-width: 768px) { .tnt-header { grid-template-columns: 4rem 1fr 4rem 4rem 4rem; font-size: 16px; padding: 10px 0; } }

.tnt-row {
    display: grid; grid-template-columns: 2.5rem 1fr 2rem 2rem 2.5rem; align-items: center; padding: 0; height: 38px;
    font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); transition: all 0.3s ease;
}
@media (min-width: 768px) { .tnt-row { grid-template-columns: 4rem 1fr 4rem 4rem 4rem; height: 45px; font-size: 16px; } }

.tnt-row:nth-child(odd) { background: rgba(0, 34, 153, 0.4); backdrop-filter: blur(4px); }
.tnt-row:nth-child(even) { background: rgba(0, 17, 102, 0.4); backdrop-filter: blur(4px); }
.tnt-row:hover { background: rgba(0, 240, 255, 0.15) !important; transform: translateX(5px); }

.tnt-pos { color: #00ffff; font-weight: 900; font-size: 14px; text-align: center; font-family: 'Lexend', sans-serif; }
@media (min-width: 768px) { .tnt-pos { font-size: 20px; } }

.tnt-club { display: flex; align-items: center; gap: 6px; font-weight: 800; color: white; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 4px; }
@media (min-width: 768px) { .tnt-club { gap: 8px; } }

.tnt-stat { color: #88ccff; font-weight: 700; text-align: center; font-family: 'Rajdhani', sans-serif; font-size: 11px; }
@media (min-width: 768px) { .tnt-stat { font-size: 16px; } }

.tnt-pts { color: white; font-weight: 900; text-align: center; font-family: 'Lexend', sans-serif; font-size: 13px; }
@media (min-width: 768px) { .tnt-pts { font-size: 16px; } }

.tnt-sidebar-right { grid-area: right; width: 30px; display: flex; flex-direction: column; background: #000; overflow: hidden; }
@media (min-width: 768px) { .tnt-sidebar-right { width: 50px; } }

.tnt-zone {
    display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; text-orientation: mixed;
    font-weight: 900; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: white;
    border-left: 1px solid rgba(0,0,0,0.5); text-align: center;
}
@media (min-width: 768px) { .tnt-zone { font-size: 14px; letter-spacing: 0.3em; } }

.zone-top { background: #3838ff; height: calc(8 * 38px); } 
.zone-mid { background: #000099; height: calc(16 * 38px); }
.zone-bot { background: #000212; height: calc(12 * 38px); border-left: 1px solid #333; color: #888; }
@media (min-width: 768px) {
    .zone-top { height: calc(8 * 45px); }
    .zone-mid { height: calc(16 * 45px); }
    .zone-bot { height: calc(12 * 45px); }
}

/* HUB */
.hub-grid { display: flex; flex-direction: column; gap: 20px; height: auto; padding-bottom: 20px; }
@media (min-width: 768px) { .hub-grid { display: grid; grid-template-columns: 1fr 350px; height: 100%; padding-bottom: 0; } }
.hub-progress-box { border: 1px solid #2AA8FF; border-radius: 8px; background: rgba(2, 6, 23, 0.8); padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; position: relative; }
.progress-label { font-family: 'Rajdhani'; font-weight: 700; color: #2AA8FF; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; margin-bottom: 5px; }
.progress-value { font-family: 'Lexend'; font-weight: 900; font-size: 48px; color: white; line-height: 1; margin-bottom: 15px; }
.progress-bar-container { width: 100%; height: 4px; background: #1e3a8a; border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: #2AA8FF; transition: width 1s ease; }
.reset-btn-hub { position: absolute; top: 15px; right: 15px; background: rgba(255, 74, 74, 0.1); border: 1px solid #FF4A4A; color: #FF4A4A; font-family: 'Rajdhani'; font-weight: 700; font-size: 10px; text-transform: uppercase; padding: 6px 12px; cursor: pointer; transition: all 0.2s; }
.hub-leaders-box { border: 1px solid #001aff; border-radius: 8px; background: rgba(2, 6, 23, 0.8); padding: 1.5rem; }
.leaders-title { font-family: 'Rajdhani'; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; text-align: right; margin-bottom: 20px; border-bottom: 1px solid #1e3a8a; padding-bottom: 10px; }
.leader-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.leader-info { display: flex; flex-direction: column; }
.leader-name { font-family: 'Inter'; font-weight: 800; font-size: 13px; color: white; text-transform: uppercase; }
.leader-owner { font-family: 'Rajdhani'; font-weight: 600; font-size: 10px; }
.leader-pts { font-family: 'Lexend'; font-weight: 900; font-size: 16px; color: white; }
.leader-rank { font-family: 'Rajdhani'; font-weight: 700; font-size: 14px; color: #475569; margin-right: 10px; width: 15px; }
.news-section { margin-top: 20px; }
.news-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.news-ai-highlight { background: linear-gradient(90deg, rgba(0,240,255,0.1) 0%, rgba(0,0,0,0) 100%); border-left: 3px solid #00f0ff; padding-left: 12px; box-shadow: 0 0 10px rgba(0, 240, 255, 0.05); }
.news-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: rgba(255,255,255,0.1); flex-shrink: 0; }
.news-text { font-family: 'Inter'; font-size: 12px; color: #cbd5e1; line-height: 1.3; }
.news-tag { font-family: 'Rajdhani'; font-weight: 800; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }

/* HALL OF FAME */
.hall-of-fame-box { margin-top: 20px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,215,0,0.3); padding: 15px; border-radius: 8px; }
.hof-title { font-family: 'Rajdhani'; font-weight: 900; color: #FFD700; text-align: center; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 10px; text-shadow: 0 0 10px rgba(255,215,0,0.5); }
.hof-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 12px; }

/* CANVAS */
#game-container { position: relative; box-shadow: 0 0 50px rgba(0, 50, 255, 0.2); border: 4px solid #111; border-radius: 8px; background-color: #050510; line-height: 0; overflow: hidden; width: 100%; max-width: 800px; aspect-ratio: 4/3; margin: 0 auto; }
canvas { image-rendering: pixelated; width: 100% !important; height: 100% !important; object-fit: contain; }
.crt-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(rgba(0, 10, 30, 0.1) 50%, rgba(0, 0, 0, 0.4) 50%); background-size: 100% 4px; pointer-events: none; z-index: 15; mix-blend-mode: overlay; }
.vignette { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle, transparent 60%, rgba(0,0,20,0.8) 100%); pointer-events: none; z-index: 14; }

/* LOADER V2.0 (3D & Realista) */
#app-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #020308;
    background-image: radial-gradient(circle at 50% 50%, #0a0f24 0%, #000 100%);
    z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0.8s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden; perspective: 1200px;
}
.loader-hidden { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(1.15) translateZ(150px); filter: blur(10px); }

.loader-grid {
    position: absolute; bottom: -60%; left: -50%; width: 200%; height: 200%;
    background-image: linear-gradient(rgba(0, 240, 255, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 240, 255, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    transform-origin: center top;
    transform: rotateX(75deg) translateY(0) translateZ(-200px);
    animation: gridMove 4s linear infinite;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 60%);
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 60%);
}

.loader-logo-container { position: relative; width: 180px; height: 180px; transform-style: preserve-3d; animation: float3D 6s ease-in-out infinite; display: flex; justify-content: center; align-items: center; }

.gyro-ring { position: absolute; border-radius: 50%; border: 2px solid transparent; transform-style: preserve-3d; mix-blend-mode: screen; }
.gyro-ring-1 { width: 100%; height: 100%; border-top-color: #00f0ff; border-bottom-color: rgba(0, 240, 255, 0.2); animation: gyro1 4s cubic-bezier(0.4, 0, 0.2, 1) infinite; box-shadow: inset 0 0 25px rgba(0,240,255,0.1), 0 0 25px rgba(0,240,255,0.1); }
.gyro-ring-2 { width: 80%; height: 80%; border-left-color: #8b5cf6; border-right-color: rgba(139, 92, 246, 0.2); animation: gyro2 5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse; box-shadow: inset 0 0 25px rgba(139,92,246,0.1), 0 0 25px rgba(139,92,246,0.1); }
.gyro-ring-3 { width: 60%; height: 60%; border-top-color: #fbbf24; border-bottom-color: rgba(251, 191, 36, 0.2); animation: gyro3 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; box-shadow: inset 0 0 25px rgba(251,191,36,0.1), 0 0 25px rgba(251,191,36,0.1); }

.loader-text { margin-top: 3.5rem; text-align: center; animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; z-index: 10; display: flex; flex-direction: column; align-items: center; transform: translateZ(50px); }
.loader-title { font-family: 'Lexend', sans-serif; font-size: 36px; font-weight: 900; font-style: italic; letter-spacing: -1px; text-shadow: 0 15px 40px rgba(0,0,0,0.9); color: white; line-height: 1; }
.loader-subtitle { font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.3em; color: #cbd5e1; margin-top: 8px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.loader-progress-wrapper { width: 260px; margin-top: 2.5rem; z-index: 10; animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; transform: translateZ(30px); }
.loader-progress { width: 100%; height: 4px; background: rgba(0,0,0,0.6); border-radius: 4px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,0.1); box-shadow: inset 0 2px 5px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
.loader-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #2AA8FF, #8b5cf6, #00f0ff); animation: loadBar 2.5s cubic-bezier(0.8, 0, 0.2, 1) forwards; position: relative; box-shadow: 0 0 15px rgba(0, 240, 255, 0.6); border-radius: 4px; }
.loader-bar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent); animation: scanline 1.5s ease-in-out infinite; }

@keyframes gridMove { 0% { transform: rotateX(75deg) translateY(0) translateZ(-200px); } 100% { transform: rotateX(75deg) translateY(60px) translateZ(-200px); } }
@keyframes float3D { 0%, 100% { transform: translateY(0) rotateX(10deg) rotateY(-10deg); } 50% { transform: translateY(-15px) rotateX(-5deg) rotateY(10deg); } }
@keyframes gyro1 { 0% { transform: rotateX(60deg) rotateY(0deg) rotateZ(0deg); } 100% { transform: rotateX(60deg) rotateY(360deg) rotateZ(360deg); } }
@keyframes gyro2 { 0% { transform: rotateX(120deg) rotateY(0deg) rotateZ(0deg); } 100% { transform: rotateX(120deg) rotateY(360deg) rotateZ(360deg); } }
@keyframes gyro3 { 0% { transform: rotateX(0deg) rotateY(60deg) rotateZ(0deg); } 100% { transform: rotateX(360deg) rotateY(60deg) rotateZ(360deg); } }
@keyframes loadBar { 0% { width: 0%; } 15% { width: 10%; } 50% { width: 60%; } 80% { width: 85%; } 100% { width: 100%; } }
@keyframes scanline { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }