@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* =========================================
   1. RESET & BASE
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #0b132b; /* Azul Escuro */
    color: #e2e8f0; /* Letras Brancas / Cinza Claro */
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   2. ESTRUTURA SPA (Páginas Ocultas/Ativas)
========================================= */
#app {
    width: 100%;
    min-height: 100vh;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. FORMS (Login, Cadastro) & CONTAINERS
========================================= */
.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(255, 107, 157, 0.05));
}

.container {
    width: 92%;
    max-width: 420px;
    margin: 0 auto;
    background: #1c2541; /* Fundo container azul meio escuro */
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #ffffff;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #cbd5e1;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #334155;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    font-size: 15px;
    color: #ffffff;
    background: #0b132b;
}

.form-group input:focus {
    border-color: #a855f7;
    background: #1c2541;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.2);
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8b5cf6, #d946ef); /* Botões mais Roxos/Rosa vivos */
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #c084fc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.link:hover {
    color: #f0abfc;
    text-decoration: underline;
}

.error-msg {
    background: #fee2e2;
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
    border: 1px solid #fca5a5;
}

/* =========================================
   4. LANDING PAGE ESTILOS
========================================= */
.lnd-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(28, 37, 65, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.lnd-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #a855f7;
}

.lnd-nav-menu button {
    width: auto;
    margin: 0 5px;
    padding: 10px 20px;
    border-radius: 8px;
}

.lnd-nav-link {
    background: transparent;
    color: #cbd5e1;
    box-shadow: none;
}

.lnd-nav-link:hover {
    background: #334155;
    color: #fff;
    box-shadow: none;
    transform: none;
}

.lnd-hero {
    position: relative;
    padding: 80px 5%;
    overflow: hidden;
}

.lnd-orbs {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}

.lnd-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s infinite ease-in-out alternate;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, -30px); }
}

.lnd-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.lnd-hero-left {
    flex: 1;
}

.lnd-live-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 201, 122, 0.1);
    color: #00C97A;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 20px;
}

.lnd-live-dot {
    width: 8px; height: 8px;
    background: #00C97A;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 201, 122, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(0, 201, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 201, 122, 0); }
}

.lnd-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 20px;
}

.lnd-title em {
    color: #FF6B9D;
    font-style: normal;
    background: linear-gradient(135deg, #a855f7, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lnd-sub {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    max-width: 500px;
}

.lnd-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.lnd-actions button {
    margin: 0;
}

.lnd-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lnd-ghost-btn {
    background: transparent;
    color: #a855f7;
    border: 2px solid #a855f7;
}

.lnd-ghost-btn:hover {
    background: #a855f7;
    color: #fff;
}

.lnd-trust {
    display: flex;
    gap: 20px;
    color: #94a3b8;
    font-size: 13px;
}

.lnd-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lnd-trust-item svg {
    color: #00C97A;
}

/* Cards Laterais Flutuantes */
.lnd-wins-col {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lnd-win-card {
    background: #1c2541;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    animation: slideInRight 0.8s ease backwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.lnd-win-avatar {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: bold; font-size: 18px;
}

.lnd-win-info { flex: 1; }
.lnd-win-name { font-weight: 600; color: #f8fafc; font-size: 14px; }
.lnd-win-amount { color: #00C97A; font-weight: bold; font-size: 16px; }
.lnd-win-label { font-size: 12px; color: #64748b; }

/* Seções extras (Stats, Como funciona) */
.lnd-stats { display: flex; justify-content: space-around; background: #1c2541; padding: 40px 5%; border-top: 1px solid #334155; border-bottom: 1px solid #334155; }
.lnd-stat { text-align: center; }
.lnd-stat-val { font-size: 2.5rem; font-weight: bold; color: #a855f7; }
.lnd-stat-lbl { color: #cbd5e1; font-size: 14px; }

.lnd-how, .lnd-test, .lnd-cta-sec { padding: 80px 5%; text-align: center; }
.lnd-how-grid, .lnd-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1200px; margin: 40px auto 0; }
.lnd-how-card, .lnd-test-card { background: #1c2541; padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); text-align: left; }
.lnd-how-num { font-size: 2rem; font-weight: bold; color: rgba(168, 85, 247, 0.2); margin-bottom: 10px; }
.lnd-how-icon { margin-bottom: 20px; }
.lnd-how-card h3 { margin-bottom: 10px; color: #fff; }
.lnd-how-card p { color: #cbd5e1; font-size: 14px; line-height: 1.6; }

.lnd-cta-sec { position: relative; overflow: hidden; background: #070b19; }
.lnd-cta-sec h2 { font-size: 2.5rem; margin-bottom: 15px; }
.lnd-cta-sec p { color: #cbd5e1; margin-bottom: 30px; }
.lnd-cta-sec button { max-width: 300px; margin: 0 auto; }

.lnd-footer { padding: 40px 5%; text-align: center; background: #1c2541; color: #94a3b8; border-top: 1px solid #334155; }
.lnd-footer-links { margin: 20px 0; display: flex; justify-content: center; gap: 20px; }
.lnd-footer-links a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.lnd-footer-warning { max-width: 600px; margin: 0 auto 20px; font-size: 12px; opacity: 0.8; }

/* =========================================
   5. GAME CANVAS E USER PANEL (Página Interna)
========================================= */
#game-container {
    position: relative;
    margin: 20px auto;
    display: flex;
    justify-content: center;
}
canvas {
    background: #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(106, 44, 112, 0.2);
    display: block;
    max-width: 100%;
}
#hud {
    position: absolute;
    top: 15px; left: 15px; right: 15px;
    display: flex; justify-content: space-between;
    color: #fff; font-weight: bold; font-size: 20px;
    z-index: 10; pointer-events: none;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
#user-panel { text-align: center; margin-top: 25px; color: #e2e8f0; }
#affiliate-box { background: #1c2541; border: 2px solid #334155; color: #cbd5e1; padding: 12px; border-radius: 8px; font-size: 13px; margin-top: 15px; word-break: break-all; }

/* =========================================
   6. RESPONSIVIDADE (Mobile)
========================================= */
@keyframes slideUpMobile {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .lnd-hero-inner { flex-direction: column; text-align: center; }
    .lnd-actions { flex-direction: column; align-items: center; }
    .lnd-actions button { width: 100%; max-width: 300px; }
    .lnd-trust { flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
    .lnd-title { font-size: 2.5rem; }
    .lnd-stats { flex-direction: column; gap: 30px; }
    .lnd-nav-menu button { padding: 8px 12px; font-size: 13px; margin: 0; }
    .container { padding: 25px 20px; width: 95%; }
    .lobby-container { padding: 20px 15px !important; }
    .lobby-wrapper { padding-bottom: 120px; } /* Espaço para o menu mobile suspenso */
    
    .lobby-header { padding: 20px 4% !important; }
    .lobby-brand { font-size: 18px; }
    .lobby-balance { font-size: 13px; padding: 6px 12px; }
    .game-banner { max-height: 130px !important; }
    .modal-content { padding: 25px 15px !important; width: 95% !important; }
    .close-modal { right: 15px !important; top: 15px !important; font-size: 24px !important; }
    
    .lnd-wins-col { position: fixed; bottom: 15px; left: 15px; right: 15px; z-index: 9999; flex-direction: column-reverse; pointer-events: none; gap: 10px; }
    .lnd-win-card { 
        pointer-events: auto; 
        animation: slideUpMobile 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
        box-shadow: 0 5px 20px rgba(0,0,0,0.2); 
        transition: all 0.4s ease; 
    }
}

/* =========================================
   7. LOBBY STYLES
========================================= */
.lobby-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background: #0b132b;
    animation: fadeIn 0.5s ease-out; /* Animação Global */
}
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: #1c2541;
    border-bottom: 1px solid #334155;
}
.lobby-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #a855f7;
    font-size: 20px;
}
.lobby-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.lobby-balance {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.lobby-container {
    margin-top: 30px;
    position: relative;
    background: #151c33;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid #334155;
    padding: 25px;
    width: 92%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 90px;
}
.bet-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.bet-btn {
    flex: 1;
    min-width: 70px;
    background: #1c2541;
    color: #cbd5e1;
    border: 2px solid #334155;
    padding: 10px;
    margin-top: 0;
}
.bet-btn:hover {
    background: #334155;
    color: #fff;
    transform: none;
    box-shadow: none;
}
.play-btn {
    font-size: 18px;
    padding: 16px;
    margin-top: 20px;
}

/* =========================================
   GAME CARD LOBBY
========================================= */
.game-card {
    background: #1c2541;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    border: 1px solid #334155;
    width: 100%;
}
.game-banner {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    display: block;
    background: #2a344a; 
    border-bottom: 1px solid #334155;
}
.game-card-content {
    padding: 20px;
}

/* =========================================
   MODAL ESTILOS (PIX)
========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    margin: 0;
    background: #1c2541;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #334155;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease-out forwards;
}
.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}
.close-modal:hover {
    color: #fff;
}
.preset-values {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}
.preset-values button {
    flex: 1;
    background: #0b132b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 10px 0;
    border-radius: 8px;
    margin-top: 0;
    font-size: 13px;
}
.preset-values button:hover {
    background: #334155;
    color: #fff;
    border-color: #a855f7;
    transform: none;
    box-shadow: none;
}
.bonus-preview {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================
   8. MENU MOBILE BOTTOM (Lobby)
========================================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 4%;
    width: 92%;
    background: #1c2541;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 1000;
    border: 1px solid #334155;
    border-radius: 24px;
    padding: 10px 15px;
    justify-content: space-between;
    align-items: center;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    font-size: 12px;
    gap: 6px;
    flex: 1;
    transition: color 0.3s;
}
.nav-item i { font-size: 22px; }
.nav-item:hover, .nav-item.active { color: #a855f7; }
.nav-item.text-danger:hover { color: #ef4444; }

.nav-item-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1.2;
    margin-top: -30px;
}
.deposit-btn {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.5);
    border: 6px solid #0f172a;
    margin-bottom: 5px;
    text-decoration: none;
}
.nav-item-center span { color: #c084fc; font-size: 12px; font-weight: 600; }

@media (max-width: 768px) {
    .mobile-bottom-nav { display: flex; }
}

/* =========================================
   9. GLASSMORPHISM / TEMA VITRIFICADO (Global)
========================================= */
body, #app {
    background: radial-gradient(circle at center, #1e1b4b, #0f172a) !important;
    color: #e2e8f0;
}
.lnd-how-card, .lnd-stat, .lnd-win-card, .auth-wrapper .container,
.lobby-container, .game-card, .modal-content, .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}
.mobile-bottom-nav { 
    border-radius: 20px !important; 
    bottom: 25px !important; 
    left: 4% !important; 
    width: 92% !important; 
    padding: 10px 15px !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important; 
}
.lobby-header {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.game-banner { border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; }
.bet-btn { background: rgba(0,0,0,0.3) !important; border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 12px !important; }
.bet-btn:hover { background: rgba(168, 85, 247, 0.4) !important; color: #fff !important; }
.auth-wrapper .container { padding: 40px !important; }
.lnd-nav {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.form-group input {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 14px !important;
}
.lnd-cta-btn, button[type="submit"], .play-btn {
    background: linear-gradient(135deg, #a855f7, #ec4899) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4) !important;
    color: #fff !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    border-radius: 16px !important;
}
.glass-header {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
