/* CONFIGURACIÓN BASE Y VARIABLES DE ESTILO PREMIUM */
:root {
    --bg-main: #060608;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --accent-color: #00FF66;
    --accent-hover: #00E5FF;
    --text-primary: #FFFFFF;
    --text-muted: #8A8D93;
    
    --blur-intensity: blur(16px);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- MOBILE-FIRST LAYOUT (Por defecto en pantallas táctiles) --- */
.sidebar {
    display: none; /* Oculto completamente en móviles */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 90px; /* Previene superposición con barra inferior */
}

/* Topbar / Header */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(6, 6, 8, 0.8);
    backdrop-filter: var(--blur-intensity);
    -webkit-backdrop-filter: var(--blur-intensity);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -1px;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.balance-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
}

.currency-type {
    color: var(--text-muted);
}

.balance-value {
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-trigger-deposit {
    background: var(--accent-color);
    color: #000000;
    font-weight: 700;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-trigger-deposit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 102, 0.3);
}

/* Estructura Bento Grid (Móvil) */
.bento-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Detalles específicos de las tarjetas Bento */
.hero-card {
    background: linear-gradient(135deg, rgba(0, 255, 102, 0.08) 0%, rgba(0, 229, 255, 0.02) 100%);
    border-color: rgba(0, 255, 102, 0.15);
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge-premium {
    background: rgba(0, 255, 102, 0.1);
    color: var(--accent-color);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 1px;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.hero-card h1 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.btn-action {
    background: #FFFFFF;
    color: #000000;
    font-weight: 700;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    align-self: flex-start;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.btn-action:hover {
    background: var(--accent-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.text-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.games-thumbnail-flex {
    display: flex;
    gap: 0.75rem;
}

.game-thumb {
    flex: 1;
    height: 110px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.game-thumb:hover {
    border-color: rgba(255,255,255,0.2);
}

.game-inner-content {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.game-multiplier {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.live-card {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="%23111" stroke="%23222" stroke-width="5"/></svg>');
    background-size: cover;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.live-indicator {
    background: #FF0055;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    align-self: flex-start;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.stat-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-hover);
}

.stat-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Barra de Navegación Inferior Móvil */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(6, 6, 8, 0.9);
    backdrop-filter: var(--blur-intensity);
    -webkit-backdrop-filter: var(--blur-intensity);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 45;
}

.mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    text-decoration: none;
    flex: 1;
    cursor: pointer;
}

.mobile-nav-item.active {
    color: var(--accent-color);
}

.item-center .center-icon-wrapper {
    background: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-8px);
    box-shadow: 0 4px 20px rgba(255,255,255,0.15);
}

/* --- INFRAESTRUCTURA DE LA PASARELA DE PAGO (MODAL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: var(--blur-intensity);
    -webkit-backdrop-filter: var(--blur-intensity);
    z-index: 100;
    display: flex;
    align-items: flex-end; /* En móvil se despliega desde abajo */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    background: #0D0E12;
    border-top: 1px solid var(--border-color);
    width: 100%;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.modal-title-group h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-title-group p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.modal-close-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Selector de Criptomonedas */
.crypto-selector {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.crypto-selector::-webkit-scrollbar {
    display: none; /* Esconde scrollbars estorbosos */
}

.crypto-pill {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.crypto-pill.active {
    background: rgba(255,255,255,0.08);
    border-color: var(--text-primary);
}

.coin-icon {
    font-weight: 900;
    font-size: 1.05rem;
}
.btc-color { color: #FF9900; }
.usdt-color { color: #26A17B; }
.eth-color { color: #627EEA; }

.pill-network {
    font-size: 0.65rem;
    background: rgba(38, 161, 123, 0.15);
    color: #26A17B;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

/* Caja de Detalles e Input de Dirección */
.deposit-details-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.qr-container {
    background: white;
    padding: 0.75rem;
    border-radius: 12px;
}

/* Simulación Estilizada del Código QR */
.qr-mockup {
    width: 120px;
    height: 120px;
    position: relative;
    background: #fff;
}
.qr-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 8px solid #000;
}
.top-left { top: 0; left: 0; }
.top-right { top: 0; right: 0; }
.bottom-left { bottom: 0; left: 0; }
.qr-center-pixel {
    position: absolute;
    top: 45px;
    left: 45px;
    width: 30px;
    height: 30px;
    background: #000;
}

.address-input-wrapper {
    width: 100%;
}

.address-input-wrapper label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.copy-input-field {
    display: flex;
    background: #14151B;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.copy-input-field input {
    background: none;
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    flex: 1;
    outline: none;
}

.btn-copy {
    background: rgba(255,255,255,0.04);
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-copy:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.security-notice {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    background: rgba(255,255,255,0.01);
    padding: 0.85rem;
    border-radius: 10px;
    border: 1px dashed var(--border-color);
}

.security-notice p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- BREAKPOINT: RESPONSIVO PARA ESCRITORIO DE GALA (MEDIAS QUERIES) --- */
@media (min-width: 768px) {
    body {
        flex-direction: row;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        width: 250px;
        background: #0B0C10;
        border-right: 1px solid var(--border-color);
        padding: 1.75rem 1.25rem;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-weight: 900;
        font-size: 1.35rem;
        letter-spacing: -1.2px;
        margin-bottom: 2.5rem;
    }

    .side-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link {
        color: var(--text-muted);
        text-decoration: none;
        padding: 0.75rem 1rem;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 0.85rem;
        transition: var(--transition-smooth);
    }

    .nav-link:hover, .nav-link.active {
        background: var(--bg-surface-hover);
        color: var(--text-primary);
    }

    .mobile-brand, .mobile-nav {
        display: none; /* Apaga navegación móvil */
    }

    .main-content {
        padding-bottom: 0;
    }

    .topbar {
        justify-content: flex-end;
        padding: 1.5rem 2rem;
    }

    /* Redistribución Asimétrica Bento Grid en Desktop */
    .bento-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(180px, auto);
        gap: 1.5rem;
        padding: 2.5rem;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }

    .hero-card {
        grid-column: span 2;
        grid-row: span 2;
        padding: 3rem;
    }

    .hero-card h1 {
        font-size: 3.2rem;
    }

    .game-card-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .live-card {
        grid-column: span 1;
        grid-row: span 1;
    }

    .stat-card {
        grid-column: span 1;
    }

    /* Adaptación del Modal para Pantallas de Escritorio */
    .modal-overlay {
        align-items: center;
        justify-content: center;
    }

    .modal-window {
        width: 460px;
        border-radius: 24px;
        border: 1px solid var(--border-color);
        padding: 2rem;
        transform: scale(0.9) translateY(20px);
    }

    .modal-overlay.active .modal-window {
        transform: scale(1) translateY(0);
    }

    .deposit-details-box {
        flex-direction: row;
        align-items: center;
    }
}
