:root {
    --primary: #00f2ea;
    --gold: #ffd700;
    --danger: #ff0055;
    --bg-dark: #0a0b10;
    --card-bg: #151720;
    --text-main: #ffffff;
    --text-muted: #8892b0;
    --glass: rgba(15, 17, 26, 0.98);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }

body { background-color: var(--bg-dark); color: var(--text-main); padding-bottom: 90px; overflow-x: hidden;}

/* --- HEADER (SEM EFEITO VIDRO PARA PERFORMANCE) --- */
.app-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    padding: 15px 20px;
    background: var(--glass); /* Removemos o backdrop-filter pesado */
    border-bottom: 1px solid rgba(0, 242, 234, 0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.8); /* Sombra mais dura e leve */
}

.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-icon { color: var(--primary); font-size: 24px; filter: drop-shadow(0 0 5px var(--primary)); }
#page-title { font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; background: linear-gradient(90deg, #fff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.search-btn { background: rgba(255,255,255,0.1); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; }
.search-container { margin-top: 15px; display: flex; align-items: center; gap: 10px; background: #252736; border-radius: 12px; padding: 10px 15px; border: 1px solid rgba(0, 242, 234, 0.2); }
.search-container input { background: transparent; border: none; color: #fff; width: 100%; outline: none; font-size: 14px; }

/* --- CONTEÚDO --- */
.app-content { margin-top: 90px; padding: 0 15px; }
.hidden { display: none !important; }

/* BANNER DASHBOARD */
.premium-banner { background: linear-gradient(135deg, rgba(0, 242, 234, 0.1), rgba(255, 0, 85, 0.05)); border: 1px solid rgba(0, 242, 234, 0.3); border-radius: 15px; padding: 20px; text-align: center; margin-bottom: 25px; position: relative; overflow: hidden; }
.premium-banner h2 { color: var(--gold); font-weight: 900; font-size: 22px; text-transform: uppercase; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); margin-bottom: 5px; }
.premium-banner p { color: var(--text-muted); font-size: 12px; font-weight: 600; }

.section-header { margin-bottom: 10px; }
.section-header h3 { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }

/* ROLAGEM HORIZONTAL (TIPO INSTAGRAM REELS) */
.horizontal-scroll { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.horizontal-scroll::-webkit-scrollbar { display: none; } /* Esconde barra no celular */

/* CARDS PREMIUM (TOP JOGADORES) */
.top-card { min-width: 130px; background: var(--card-bg); border-radius: 15px; padding: 15px 10px; text-align: center; border: 1px solid rgba(255,255,255,0.05); position: relative; scroll-snap-align: start; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.top-card.rank-1 { border-color: var(--gold); background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, var(--card-bg) 100%); transform: scale(1.02); }
.top-card.rank-2 { border-color: silver; }
.top-card.rank-3 { border-color: #cd7f32; }

.top-medal { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 20px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.8)); }
.top-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin: 10px auto; border: 2px solid #555; }
.top-card.rank-1 .top-avatar { border: 3px solid var(--gold); box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }

.top-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.top-score { font-size: 11px; font-weight: 900; background: rgba(0,0,0,0.5); padding: 3px 8px; border-radius: 8px; display: inline-block; }
.score-gold { color: var(--gold); } .score-red { color: var(--danger); }

/* CARD DE VÍDEO */
.card-video { background: var(--card-bg); border-radius: 16px; overflow: hidden; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.thumb-container { position: relative; height: 160px; }
.thumb-container img { width: 100%; height: 100%; object-fit: cover; }
.play-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; background: rgba(255, 0, 85, 0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; box-shadow: 0 0 15px var(--danger); }
.card-info { padding: 15px; }
.card-title { font-size: 14px; font-weight: 700; display: block; margin-bottom: 5px; line-height: 1.3; }
.card-date { font-size: 11px; color: var(--text-muted); display: block; }

/* --- LISTA DE JOGADORES NA PARTIDA --- */
.btn-voltar { background: #252736; color: white; border: none; padding: 10px 15px; border-radius: 10px; font-weight: bold; margin-bottom: 15px; width: 100%; display: flex; gap: 10px; align-items: center; justify-content: center; }
.match-stats-card { display: flex; justify-content: space-around; flex-wrap: wrap; background: var(--card-bg); padding: 15px; border-radius: 15px; margin-bottom: 20px; border: 1px solid rgba(0, 242, 234, 0.2); }
.r-stat { text-align: center; width: 45%; }
.r-stat span { font-size: 10px; text-transform: uppercase; color: var(--text-muted); display: block; }
.r-stat strong { font-size: 20px; font-weight: 900; }
.highlight { color: var(--danger); }

/* Linha do Jogador */
.player-row { display: flex; align-items: center; background: var(--card-bg); padding: 10px; border-radius: 12px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.02); }
.top-1-row { border-color: var(--gold); background: linear-gradient(90deg, rgba(255,215,0,0.05), transparent); }
.rank-num { font-size: 14px; font-weight: 900; width: 30px; color: var(--text-muted); }
.top-1-row .rank-num { color: var(--gold); font-size: 18px; }
/* Força a caixa do avatar a ser um círculo perfeito e nunca se espremer */
.p-avatar { width: 42px; height: 42px; min-width: 42px; margin-right: 12px; border-radius: 50%; flex-shrink: 0; }
.p-avatar img { border-radius: 50%; }
.p-info { flex: 1; overflow: hidden; }
.p-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-detail { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.p-kills { background: rgba(255, 0, 85, 0.1); color: var(--danger); border: 1px solid rgba(255, 0, 85, 0.3); padding: 4px 8px; border-radius: 6px; font-weight: 800; font-size: 12px; }

/* --- BOTTOM NAV --- */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 75px; background: var(--glass); /* Removemos o backdrop-filter */ border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-around; align-items: center; z-index: 100; padding-bottom: 15px; }
.nav-item { background: none; border: none; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; flex: 1; font-weight: 600; }
.nav-item i { font-size: 22px; transition: 0.2s; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: translateY(-3px); filter: drop-shadow(0 0 5px var(--primary)); }

/* --- PERFIL GAVETA --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 2000; display: none; align-items: flex-end; /* Removemos o backdrop-filter */ }
.bottom-sheet { width: 100%; background: var(--bg-dark); border-radius: 30px 30px 0 0; padding: 25px 20px; animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); max-height: 85vh; overflow-y: auto; border-top: 1px solid rgba(0, 242, 234, 0.3); box-shadow: 0 -10px 40px rgba(0, 242, 234, 0.1); }
.drag-handle { width: 50px; height: 5px; background: #333; border-radius: 10px; margin: 0 auto 20px; }
.profile-card { text-align: center; margin-bottom: 20px; }
.sheet-avatar { width: 90px; height: 90px; margin: 0 auto 10px; }
.sheet-avatar img { width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--primary); box-shadow: 0 0 20px rgba(0, 242, 234, 0.3); object-fit: cover; }
#perfil-nome { font-size: 20px; font-weight: 900; margin-bottom: 5px; }
.badge { font-size: 10px; background: rgba(0, 242, 234, 0.1); border: 1px solid var(--primary); color: var(--primary); padding: 4px 12px; border-radius: 15px; font-weight: 800; text-transform: uppercase; }

.sheet-stats { display: flex; justify-content: space-between; margin-bottom: 20px; background: var(--card-bg); padding: 15px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); }
.s-box { text-align: center; width: 33%; }
.s-box i { font-size: 18px; margin-bottom: 5px; display: block; }
.s-box span { font-size: 20px; font-weight: 900; display: block; line-height: 1; margin-bottom: 3px; }
.s-box label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.gold { color: var(--gold); } .red { color: var(--danger); } .blue { color: #3b82f6; }

.hist-title { font-size: 12px; margin-bottom: 10px; color: var(--text-muted); text-transform: uppercase; font-weight: 800; }
.sheet-history { background: var(--card-bg); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); padding: 5px 15px; }
.hist-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 12px; align-items: center; }
.hist-item:last-child { border-bottom: none; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* CAIXA DE ANÚNCIO (PREPARADA PARA ADSTERRA) */
.ad-space-premium { background: rgba(0,0,0,0.5); border: 1px dashed #333; padding: 20px; border-radius: 12px; margin: 20px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100px; }
.ad-space-premium span { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #555; }

/* --- TUTORIAL DE PRIMEIRO ACESSO --- */
.tutorial-card { 
    background: var(--bg-dark); 
    border: 1px solid rgba(0, 242, 234, 0.3); 
    border-radius: 20px; 
    padding: 25px; 
    width: 90%; 
    max-width: 350px; 
    text-align: center; 
    box-shadow: 0 10px 50px rgba(0,0,0,0.8); 
}
.tutorial-card h2 { color: white; font-size: 20px; margin-bottom: 5px; font-weight: 900; text-transform: uppercase; }
.tutorial-card p { color: var(--text-muted); font-size: 12px; margin-bottom: 25px; font-weight: 600; }

.tutorial-steps { text-align: left; list-style: none; margin-bottom: 25px; padding: 0 10px; }
.tutorial-steps li { font-size: 12px; color: #e2e8f0; margin-bottom: 15px; display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.tutorial-steps i { margin-top: 2px; font-size: 18px; }

.btn-tutorial { 
    background: linear-gradient(90deg, var(--primary), #00b3a6); 
    border: none; 
    color: #111; 
    padding: 12px 20px; 
    border-radius: 12px; 
    font-weight: 900; 
    text-transform: uppercase; 
    width: 100%; 
    cursor: pointer; 
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.4); 
}

/* --- SANFONA DO PERFIL (EXPANDIR/RECOLHER) --- */
.hist-accordion summary {
    cursor: pointer;
    list-style: none; /* Tira a seta padrão */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    border-radius: 12px;
    transition: 0.3s ease;
    margin-bottom: 5px;
}
/* Esconde a seta padrão no Safari/Chrome */
.hist-accordion summary::-webkit-details-marker {
    display: none;
}
/* Coloca a setinha do FontAwesome que vira pra cima e pra baixo */
.hist-accordion summary:after {
    content: '\f078'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    transition: transform 0.3s ease;
}
/* Quando a sanfona estiver aberta */
.hist-accordion[open] summary:after {
    transform: rotate(180deg); /* Vira a setinha pra cima */
}
.hist-accordion[open] summary {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid rgba(0, 242, 234, 0.3);
}
.hist-accordion[open] .sheet-history {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    animation: fadeIn 0.3s; /* Usa a sua animação suave */
}