@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-dark: #010409;
    --bg-blue: #081225;
    --theme-accent: #00f0ff;
    --glass-bg: rgba(10, 15, 30, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --radius-box: 6px;
    --radius-btn: 4px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Remove o click azul nativo do mobile */
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-blue) 50%, var(--bg-dark) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

body.page-exit .main-content {
    animation: pageFadeOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pageFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Layout base (Responsivo mobile first) */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
    padding-top: 80px; /* Espaço para o Top Header */
    padding-bottom: 90px; /* Espaço para o Mobile Footer */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* A animação agora acontece apenas no conteúdo central */
    animation: pageFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* Painel Efeito Vidro */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-box);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Botões de Ação */
.btn-action {
    background: linear-gradient(135deg, #0052D4, #4364F7);
    color: #ffffff;
    border: 1px solid rgba(67, 100, 247, 0.4);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 15px rgba(0, 82, 212, 0.3);
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-action:hover {
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 6px 20px rgba(0, 240, 255, 0.4);
    border-color: var(--theme-accent);
    transform: translateY(-2px);
}

/* Botões Especiais Tema Brasil (Secundário) */
.btn-outline-yellow {
    background: transparent;
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent);
}
.btn-outline-yellow:hover {
    background: rgba(255, 223, 0, 0.05);
    box-shadow: 0 0 15px rgba(255, 223, 0, 0.2);
}

/* Inputs do Formulário */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-btn);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

/* ================================
   NOVO COMPONENTES MOBILE
================================= */

/* Header Mobile Topo */
.top-header {
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px; display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.header-btn {
    background: none; border: none; color: var(--theme-accent); font-size: 1.8rem; cursor: pointer; display: flex; align-items: center;
}
.header-logo img { max-height: 30px; }
.header-logo .iconify { font-size: 1.8rem; color: var(--theme-accent); }
.header-wallet { display: flex; align-items: center; gap: 8px; }
.header-wallet .saldo { font-weight: 700; color: var(--text-main); font-size: 0.95rem; }

/* Menu Lateral (Off-canvas) */
.side-menu {
    position: fixed; top: 15px; left: -290px; width: 270px; height: calc(100vh - 30px);
    background: rgba(5, 10, 20, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-left: none; border-radius: 0 var(--radius-box) var(--radius-box) 0;
    z-index: 1002; transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column;
    box-shadow: 20px 0 40px rgba(0,0,0,0.5);
}
.side-menu.open { left: 0; }
.side-menu-header { padding: 20px; display: flex; justify-content: flex-end; }
.side-nav { display: flex; flex-direction: column; gap: 5px; padding: 0 15px; }
.side-nav a {
    color: var(--text-main); text-decoration: none; font-size: 1.05rem;
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-btn); transition: 0.3s;
}
.side-nav a:hover { background: var(--glass-border); color: var(--theme-accent); padding-left: 20px; }
.side-nav a .iconify { font-size: 1.4rem; }

.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 1001;
    display: none; opacity: 0; transition: opacity 0.3s ease;
}
.menu-overlay.open { display: block; opacity: 1; }

/* Mobile Footer de Navegação */
.mobile-footer {
    background: rgba(1, 4, 9, 0.8); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border); padding: 10px 15px;
    display: flex; justify-content: space-around; align-items: center;
    position: fixed; bottom: 0; left: 0; width: 100%; z-index: 9999;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.mobile-footer a {
    color: var(--text-muted); text-decoration: none; display: flex;
    flex-direction: column; align-items: center; font-size: 0.75rem; transition: color 0.3s;
}
.mobile-footer a .iconify { font-size: 1.5rem; margin-bottom: 4px; }
.mobile-footer a:hover, .mobile-footer a.active { color: var(--theme-accent); }

/* Toast Notifications */
.toast-container {
    position: fixed; top: 80px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
    background: rgba(5, 10, 20, 0.9); border-left: 3px solid var(--theme-accent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-left: 3px solid var(--theme-accent);
    padding: 15px 20px; border-radius: var(--radius-btn); color: #fff; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); pointer-events: auto; font-size: 0.9rem;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, fadeOut 0.3s 2.7s forwards;
}
.toast.error { border-left-color: #ff4d4d; }

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Match Cards (Lobby) */
.match-card {
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.match-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.05);
    transform: translateY(-3px);
}
.match-card-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px;
}
.match-card-vs {
    display: flex; align-items: center; justify-content: space-between; margin: 5px 0;
}
.player-info {
    display: flex; align-items: center; gap: 10px; width: 40%;
}
.player-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-blue), #1e293b);
    border: 1px solid var(--theme-accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: var(--theme-accent); flex-shrink: 0;
}
.vs-badge {
    background: rgba(255, 68, 68, 0.1); color: #ff4d4d;
    padding: 5px 10px; border-radius: 20px; font-size: 0.8rem;
    font-weight: 900; border: 1px solid rgba(255, 68, 68, 0.3);
}
.match-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.3); padding: 12px 15px; border-radius: 8px;
}
.prize-info { text-align: left; }
.prize-info span { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; }
.prize-info strong { color: #00e676; font-size: 1.1rem; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
.live-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
