@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Nunito:wght@400;700&display=swap');

:root {
    --primary: #db8c3d;
    --primary-dark: #b56e26;
    --secondary: #1E4A79;
    --accent: #FF5E78;
    --dark: #232323;
    --light: #ffffff;
    --border-radius: 20px;
    --border-width: 3px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {    
    width: 100%;
    font-family: 'Nunito', sans-serif;
    background-color: #f0f0f0;
    background-image: radial-gradient(#d1d1d1 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--dark);
}

h1, h2, h3, .btn {
    font-family: 'Fredoka', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- UTILITÁRIOS --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-white { color: white; }
.text-primary { color: var(--primary); }
.text-muted { color: #888; }
.bg-dark { background-color: var(--dark); }
.bg-black { background-color: #000; }
.w-100 { width: 100%; }
.d-none { display: none; }
.flex-1 { flex: 1; }

/* Margens */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-50 { margin-top: 50px; }

/* Font Sizes */
.fs-1-2 { font-size: 1.2rem; }
.fs-1-5 { font-size: 1.5rem; }
.fs-2 { font-size: 2rem; }
.fs-2-5 { font-size: 2.5rem; }

/* --- GERAL --- */
.container {  
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    border: var(--border-width) solid #000;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 4px 0 #000;
    text-align: center;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #000;
}

.btn-primary { background-color: var(--primary); color: #000; }
.btn-secondary { background-color: var(--secondary); color: #fff; text-shadow: 1px 1px 0 #000; }
.btn-accent { background-color: var(--accent); color: #fff; text-shadow: 1px 1px 0 #000; }

/* --- HEADER --- */
header {
    background: var(--dark);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 5px solid var(--accent);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 180px;
    max-width: 100%;
    height: auto;
    display: block;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.user-welcome {
    color: white;
    font-weight: bold;
    align-self: center;
    margin-right: 10px;
}

/* --- HERO SECTION (HOME) --- */
.hero {
    background: linear-gradient(135deg, var(--secondary), #0088cc);
    color: white;
    padding: 60px 0;
    text-align: center;
    border-bottom: var(--border-width) solid #000;
}

.logo-home {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.logo-home img {
    width: 300px;
    max-width: 100%;
    height: auto;
}

.hero h1 {
    font-size: 3rem;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 20px;
}

.video-wrapper {
    margin: 40px auto;
    max-width: 800px;
    border: 5px solid #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.2);
}

.video-wrapper iframe {
    display: block;
    width: 100%; 
}

/* --- STATS BAR --- */
.stats-bar {
    background: var(--primary);
    padding: 40px 0;
    border-top: var(--border-width) solid #000;
    border-bottom: var(--border-width) solid #000;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    gap: 20px;
}

.stat-item h3 { font-size: 2.5rem; color: #000; }
.stat-item p { font-weight: bold; text-transform: uppercase; }

/* --- CARDS GRID (HOME) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.card {
    background: white;
    border: var(--border-width) solid #000;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.1);
}
.card-icon { font-size: 3rem; margin-bottom: 15px; }

/* --- FOOTER --- */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
}

/* --- CHECKOUT / FORMULÁRIOS --- */
.checkout-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.form-container {
    max-width: 550px;
    width: 100%;
    background: #fff;
    padding: 60px 50px;
    border: 4px solid #000;
    border-radius: 30px;
    box-shadow: 10px 10px 0 rgba(0,0,0,0.2);
    transform: rotate(-1deg);
    transition: transform 0.3s;
    text-align: center;
}

.form-container:hover {
    transform: rotate(0deg) scale(1.02);
}

.form-group {
    margin-bottom: 25px;
    text-align: center;
}

.form-group label {
    font-family: 'Fredoka', sans-serif;
    color: var(--secondary);
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 10px;
    display: block;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 18px 20px;
    border: 3px solid #000;
    border-radius: 15px;
    font-size: 1.2rem;
    background: #f4f4f4;
    transition: 0.3s;
    font-weight: bold;
    color: var(--dark);
    text-align: center;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 94, 120, 0.2);
    transform: translateY(-2px);
}

/* Botão largo para formulário */
.btn-block {
    width: 100%;
    padding: 18px;
    font-size: 1.3rem;
    margin-top: 10px;
}

.secure-badge {
    background: #eef;
    color: var(--secondary);
    padding: 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    border: 2px dashed #aab;
}

/* --- DASHBOARD --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.sidebar {
    background: white;
    border: var(--border-width) solid #000;
    border-radius: var(--border-radius);
    padding: 20px;
    height: fit-content;
}

.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 10px; }

.sidebar a {
    text-decoration: none;
    color: var(--dark);
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: 0.2s;
}

.sidebar a:hover, .sidebar a.active {
    background-color: var(--secondary);
    color: white;
    border: 2px solid #000;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.dashboard-banner {
    background: var(--dark);
    color: white;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    text-align: center;
}

/* Stats Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border: 3px solid #000;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.1);
}
.stat-card.win { background-color: #d4edda; }
.stat-card.lose { background-color: #f8d7da; }
.stat-card.goals { background-color: #fff3cd; }

.stat-number { 
    font-size: 2.5rem; 
    font-family: 'Fredoka', sans-serif; 
    font-weight: bold; 
    display: block;
    margin-top: 5px;
}

/* Lista de Partidas */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    padding: 0 20px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.match-card {
    background: white;
    border: 3px solid #000;
    border-radius: 15px;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    align-items: center;
    transition: transform 0.2s;
}

.match-card:hover {
    transform: translateX(5px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.1);
}

.match-label {
    display: none; 
    font-weight: bold;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2px;
}

.badge-result {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-align: center;
    border: 2px solid rgba(0,0,0,0.1);
}
.bg-win { background: #d4edda; color: #155724; }
.bg-lose { background: #f8d7da; color: #721c24; }
.bg-wo { background: #fff3cd; color: #856404; }

/* --- ARENA (GAME) --- */
.arena-body {
    background-color: #111;
    background-image: none;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.arena-header {
    background: #000;
    border-bottom: 2px solid #333;
    padding: 10px 0;
    position: relative;
    z-index: 50;
}

/* CONTAINER DO JOGO */
.game-container {
    flex-grow: 1;
    display: flex;
    justify-content: center; 
    align-items: center;     
    position: relative;
    padding: 20px;
    width: 100%;
}

/* MOLDURA PRETA */
.game-frame {
    width: fit-content; 
    height: fit-content; 
    border: 5px solid #333;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 0 50px rgba(0, 194, 255, 0.2);
    position: relative;
    display: block; 
    line-height: 0;
}

/* O CANVAS */
#unity-canvas {
    background: #232323;
    display: block;
}

.game-loading-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-direction: column;
    text-align: center;
    line-height: normal; 
}

/* Spinner */
.spinner {
    margin-top: 20px;
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Botão de Fullscreen (Desktop) */
.fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>');
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    transition: 0.2s;
    z-index: 20; 
}
.fullscreen-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Botão Fechar Mobile */
.mobile-close-btn {
    display: none; /* Invisível no PC */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 9999;
    
    /* Tamanho do círculo */
    width: 40px;
    height: 40px;
    
    /* Estilo do círculo */
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    
    /* Ícone X (SVG) Centralizado */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px; /* Tamanho do X dentro da bolinha */
    
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.mobile-close-btn:active {
    transform: scale(0.9); /* Efeito de clique */
    background-color: rgba(0, 0, 0, 0.8);
}

/* --- AVISO DE ORIENTAÇÃO (PORTRAIT) --- */
.orientation-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    color: white;
}

.phone-icon {
    width: 60px;
    height: 100px;
    border: 5px solid white;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    animation: rotate-phone 2s infinite ease-in-out;
}

.phone-icon::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.orientation-overlay h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.orientation-overlay p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #ccc;
}

/* --- Links de Autenticação (Login) --- */
.auth-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

.auth-links a {
    text-decoration: none;
    color: var(--secondary);
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

@keyframes rotate-phone {
    0% { transform: rotate(0deg); }
    30% { transform: rotate(90deg); }
    80% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

/* --- RANKING GLOBAL --- */
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* Espaço entre as linhas */
}

.ranking-table th {
    text-align: left;
    padding: 10px 20px;
    color: #666;
    font-family: 'Fredoka', sans-serif;
}

.ranking-table td {
    background: white;
    padding: 15px 20px;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    vertical-align: middle;
}

/* Bordas arredondadas nas laterais da linha */
.ranking-table td:first-child {
    border-left: 2px solid #000;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    width: 80px;
}

.ranking-table td:last-child {
    border-right: 2px solid #000;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    font-weight: bold;
    color: var(--primary);
}

/* Cores das Medalhas (Top 3) */
.rank-1 td:first-child { background-color: #FFD700; color: #000; border-color: #000; } /* Ouro */
.rank-2 td:first-child { background-color: #C0C0C0; color: #000; border-color: #000; } /* Prata */
.rank-3 td:first-child { background-color: #CD7F32; color: #000; border-color: #000; } /* Bronze */

/* --- PERFIL / MINHA CONTA --- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #000;
    object-fit: cover;
    background: white;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent);
    color: white;
    border: 2px solid #000;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- FAQ / AJUDA --- */
.faq-item {
    margin-bottom: 15px;
}

/* Usando o elemento nativo details/summary para accordion sem JS */
.faq-item details {
    background: white;
    border: 3px solid #000;
    border-radius: 15px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item summary {
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
    list-style: none; /* Remove a setinha padrão feia */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

/* Adiciona um + ou - customizado */
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: bold;
    color: var(--primary);
}

.faq-item details[open] summary::after {
    content: '-';
    color: var(--accent);
}

.faq-item details[open] {
    box-shadow: 5px 5px 0 rgba(0,0,0,0.1);
}

.faq-content {
    padding: 20px;
    border-top: 2px dashed #eee;
    background: #f9f9f9;
    line-height: 1.6;
    color: #555;
}

.support-box {
    background: var(--primary);
    border: 3px solid #000;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
}

/* --- PÁGINA LEGAL (POLÍTICA) --- */
.legal-content {
    line-height: 1.6;
    color: #444;
}

.legal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    margin-top: 30px;
}

.legal-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    margin-top: 20px;
    color: #000;
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.legal-content li {
    margin-bottom: 5px;
}

.legal-content hr {
    border: 0;
    border-top: 2px dashed #ccc;
    margin: 30px 0;
}

/* --- CHECKBOX PERSONALIZADO (CHECKOUT) --- */
.form-check {
    display: flex;
    align-items: center; /* Alinha checkbox e texto verticalmente */
    justify-content: center; /* Centraliza no container */
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: left;
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary); /* Cor do check nativo moderno */
}

.form-check a {
    color: var(--secondary);
    text-decoration: underline;
    font-weight: bold;
}

/* --- FOOTER LINKS --- */
footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
    font-size: 0.9rem;
}

footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

footer .separator {
    color: #555;
}

/* --- BANNER LGPD --- */
.lgpd-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(35, 35, 35, 0.95); /* Var(--dark) com transparência */
    border-top: 4px solid var(--primary); /* Borda laranja no topo */
    color: white;
    padding: 20px;
    z-index: 9990; /* Alto, mas abaixo do Overlay de Rotação (9999) */
    display: none; /* Começa oculto, o JS que vai mostrar */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
}

.lgpd-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.lgpd-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.lgpd-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: bold;
}

.lgpd-btn {
    background: var(--primary);
    color: #000;
    border: 2px solid #fff;
    padding: 10px 25px;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.lgpd-btn:hover {
    transform: scale(1.05);
    background: #fff;
    border-color: var(--primary);
}

/* --- FILTROS DE ESTATÍSTICAS (ABAS) --- */
.stats-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #000;
    font-weight: bold;
    font-family: 'Fredoka', sans-serif;
    color: #666;
    background: #fff;
    transition: 0.2s;
    font-size: 0.9rem;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.filter-btn:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
}

/* Estado Ativo (Selecionado) */
.filter-btn.active {
    background: var(--primary); /* Laranja */
    color: white;
    box-shadow: 2px 2px 0 #000;
    transform: translateY(1px); /* Parece pressionado */
}

/* --- RANKING GLOBAL (TABLELESS / DIVS) --- */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espaço entre as linhas */
}

/* Cabeçalho da Tabela */
.ranking-header {
    display: grid;
    /* Define colunas: Rank (pequeno), Nome (flexível), Jogos, Vitórias, Gols */
    grid-template-columns: 60px 2fr 1fr 1fr 1fr;
    padding: 0 20px;
    font-weight: bold;
    color: #666;
    font-family: 'Fredoka', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Linha de Ranking (Card) */
.ranking-row {
    background: white;
    border: 3px solid #000;
    border-radius: 15px;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 60px 2fr 1fr 1fr 1fr;
    align-items: center;
    transition: transform 0.2s;
}

.ranking-row:hover {
    transform: translateX(5px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.1);
}

/* Coluna de Posição (#) */
.rank-pos {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Fredoka', sans-serif;
}

/* Cores do Top 3 */
.ranking-row.rank-1 { background-color: #fff9db; border-color: #e6b800; } /* Ouro claro */
.ranking-row.rank-1 .rank-pos { color: #e6b800; }

.ranking-row.rank-2 { background-color: #f2f2f2; border-color: #999; } /* Prata claro */
.ranking-row.rank-2 .rank-pos { color: #777; }

.ranking-row.rank-3 { background-color: #fff0e0; border-color: #cd7f32; } /* Bronze claro */
.ranking-row.rank-3 .rank-pos { color: #cd7f32; }

/* Linha do Usuário (Você) */
.ranking-row.is-me {
    border: 3px solid var(--primary);
    background-color: #fff8f0;
    box-shadow: 0 0 15px rgba(219, 140, 61, 0.4);
}

/* Informações do Jogador (Foto + Nome) */
.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 1.1rem;
}

.player-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #000;
    object-fit: cover;
    background: #eee;
}

/* Labels para Mobile (escondidos no desktop) */
.mobile-label {
    display: none;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 2px;
}

/* --- SUB-FILTRO (ANOS) --- */
.sub-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.sub-btn {
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 0.8rem;
    color: #666;
    background: #f9f9f9;
    font-weight: bold;
    transition: 0.2s;
}

.sub-btn:hover, .sub-btn.active {
    background: var(--secondary); /* Azul */
    color: white;
    border-color: var(--secondary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.progress-wrapper {
        background: #fff;
        padding: 20px;
        border-radius: 15px;
        border: 3px solid #000;
        margin-bottom: 30px;
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .progress-bar-container {
        flex-grow: 1;
        background: #eee;
        height: 25px;
        border-radius: 50px;
        border: 2px solid #000;
        overflow: hidden;
    }

    .progress-fill {
        background: var(--primary);
        height: 100%;
        width: <?php echo $porcentagem; ?>%;
        transition: width 1s ease-in-out;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        font-weight: bold;
        color: white;
        text-shadow: 1px 1px 0 #000;
    }

    /* GRID DE CONQUISTAS */
    .achievements-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .achievement-card {
        background: #fff;
        border: 3px solid #ccc; /* Padrão bloqueado */
        border-radius: 15px;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        opacity: 0.6; /* Bloqueado fica meio transparente */
        transition: 0.3s;
        position: relative;
    }

    /* ESTILO DESBLOQUEADO */
    .achievement-card.unlocked {
        border-color: #000;
        opacity: 1;
        box-shadow: 5px 5px 0 rgba(0,0,0,0.1);
        background: #fff;
    }

    .achievement-card.unlocked:hover {
        transform: translateY(-5px);
    }

    /* ICONE */
    .ach-icon {
        font-size: 3rem;
        background: #f0f0f0;
        width: 70px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 2px solid #ccc;
        filter: grayscale(100%); /* Ícone cinza se bloqueado */
    }

    .achievement-card.unlocked .ach-icon {
        filter: grayscale(0%);
        border-color: #000;
        background: #fff;
    }

    /* BORDAS POR TIER (APENAS SE DESBLOQUEADO) */
    .achievement-card.unlocked.bronze { border-bottom: 5px solid #CD7F32; }
    .achievement-card.unlocked.silver { border-bottom: 5px solid #C0C0C0; }
    .achievement-card.unlocked.gold   { border-bottom: 5px solid #FFD700; }
    .achievement-card.unlocked.platinum { border-bottom: 5px solid #E5E4E2; background: linear-gradient(to bottom right, #fff, #f0f8ff); }

    .ach-info h4 { margin-bottom: 5px; text-transform: uppercase; font-size: 1rem; }
    .ach-info p { font-size: 0.9rem; color: #666; margin-bottom: 5px; line-height: 1.3; }
    .ach-date { font-size: 0.75rem; color: var(--primary); font-weight: bold; }

@media (orientation: portrait) {
    .orientation-overlay {
        display: flex !important;
    }
}

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
    
    /* 1. Header & Logo */
    .nav-container { flex-direction: column; gap: 15px; align-items: center; }
    .logo { justify-content: center; width: 100%; }
    .nav-buttons { width: 100%; justify-content: center; gap: 10px; }
    .nav-buttons .btn { flex: 1; padding: 10px 5px; font-size: 0.85rem; white-space: normal; height: 100%; }
    .user-welcome { display: none; }

    /* 2. Arena Mobile: CONFIGURAÇÃO DE JOGO */
    
    /* Esconde Header */
    .arena-header { display: none !important; }
    
    /* Esconde Botão Fullscreen padrão */
    .fullscreen-btn { display: none !important; }
    
    /* Mostra botão Fechar "X" */
    .mobile-close-btn { display: flex !important; }

    /* Remove bordas e padding */
    .game-container {
        padding: 0; 
        align-items: flex-start;
    }

    .game-frame {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .unity-mobile {
        width: 100% !important;
        height: 100% !important;
        position: fixed !important; /* Força fixed */
        top: 0;
        left: 0;
        z-index: 999; /* Garante que fique na frente do Header */
        background: #000; /* Garante fundo preto enquanto carrega */
        display: block;
    }

    /* 3. Outros Ajustes Mobile */
    .hero h1 { font-size: 2.2rem; }
    .form-container { padding: 30px 20px; }
    .dashboard-layout { grid-template-columns: 1fr; gap: 20px; }
    .sidebar { padding: 15px; }
    .sidebar ul { display: flex; flex-direction: column; gap: 10px; }
    .sidebar a { background-color: #fff; border: 2px solid #ddd; justify-content: center; }
    .stats-grid { grid-template-columns: 1fr; }
    .match-header { display: none; }
    .match-card { display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 20px; }
    .match-label { display: block; }
    .match-data { width: 100%; border-bottom: 1px dashed #eee; padding-bottom: 8px; }
    .match-data:last-child { border-bottom: none; padding-bottom: 0; }

    .ranking-table th:nth-child(3), 
    .ranking-table td:nth-child(3) { /* Esconde a coluna "Jogos" no mobile se ficar apertado */
        display: none;
    }

    .lgpd-content {
        flex-direction: column;
        text-align: center;
    }
    .lgpd-btn {
        width: 100%;
    }

    /* Esconde o cabeçalho no mobile */
    .ranking-header { display: none; }

    /* Transforma a linha em um Card vertical */
    .ranking-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        text-align: center;
        position: relative;
    }

    /* Posição no canto superior esquerdo */
    .rank-pos {
        position: absolute;
        top: 10px;
        left: 15px;
        font-size: 2rem;
        opacity: 0.3;
    }

    /* Jogador no topo */
    .player-info {
        flex-direction: column;
        font-size: 1.3rem;
    }
    
    .player-avatar {
        width: 70px;
        height: 70px;
        border-width: 3px;
    }

    /* Stats em Grid no Mobile (3 colunas) */
    .rank-stats-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        width: 100%;
        gap: 10px;
        border-top: 2px dashed #eee;
        padding-top: 15px;
    }

    .stat-box {
        display: flex;
        flex-direction: column;
    }

    .mobile-label { display: block; }
}