@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

:root {
    --bg: #0d0f14;
    --accent: #ff0044;
    --success: #00ff88;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background: var(--bg);
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow: hidden; /* Evita scrolls raros */
}

/* Contenedor Principal */
.app-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
    box-sizing: border-box;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo { font-size: 24px; font-weight: 900; margin-bottom: 30px; text-align: center; }
.logo span { color: var(--accent); }

.nav-menu { list-style: none; padding: 0; }
.nav-menu li { padding: 15px; border-radius: 12px; margin-bottom: 5px; transition: 0.3s; }
.nav-menu li.active { background: var(--accent); }
.nav-menu a { color: white; text-decoration: none; font-weight: bold; }

/* Área de Contenido */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Dashboard Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.balance-card { color: var(--success); font-weight: 900; font-size: 20px; }

/* AVIATOR LAYOUT */
.aviator-wrapper {
    display: flex;
    gap: 15px;
    flex: 1; /* Ocupa el resto de la pantalla */
    min-height: 0; /* Importante para scrolls internos */
}

.bets-sidebar, .chat-sidebar {
    width: 300px;
    background: var(--glass);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* EL ÁREA DEL AVIÓN */
#aviator-game-canvas {
    flex: 1; /* Crece dinámicamente */
    background: #000;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid #222;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-mult {
    font-size: 120px;
    font-weight: 900;
    z-index: 10;
    transition: 0.1s;
}

#plane {
    position: absolute;
    font-size: 60px;
    bottom: 20%;
    left: 10%;
    z-index: 5;
    filter: drop-shadow(0 0 20px var(--accent));
}

#crash-msg {
    position: absolute;
    top: 20%;
    color: var(--accent);
    font-weight: 900;
    font-size: 32px;
    text-transform: uppercase;
}

/* CONTROLES */
.controls-panel {
    background: var(--glass);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.bet-input-group {
    background: rgba(0,0,0,0.4);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid #333;
}

.bet-input-group input {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    width: 100px;
    text-align: center;
    outline: none;
}

.btn-main {
    padding: 20px 60px;
    font-size: 24px;
    font-weight: 900;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
}

#btn-bet { background: #00ff88; color: #000; box-shadow: 0 5px 0 #009e54; }
#btn-cashout { background: #ffc107; color: #000; box-shadow: 0 5px 0 #a37b00; }
.btn-main:active { transform: translateY(3px); box-shadow: none; }
.btn-main:disabled { background: #333; color: #666; box-shadow: none; cursor: default; }

/* SCROLLS */
.scroll-area { flex: 1; overflow-y: auto; padding-right: 5px; }
.scroll-area::-webkit-scrollbar { width: 4px; }
.scroll-area::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }

/* HISTORIAL ARRIBA */
.history-line { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: hidden; }
.hist-badge { padding: 4px 12px; border-radius: 20px; background: #1a1f29; font-size: 12px; font-weight: bold; border: 1px solid #333; }

/* Historial: tipos de transacción */
.type-bet { color: #888; }
.type-win { color: #00ff88; font-weight: bold; }
.type-admin { color: #ffc107; }
.type-referral { color: #3498db; }