:root {
    --bg-color: #0b1d15;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa8822;
    --zone-bg: rgba(0, 0, 0, 0.4);
    --zone-border: rgba(212, 175, 55, 0.3);
    --zone-hover: rgba(212, 175, 55, 0.1);
    --text-light: #f0f0f0;
    --accent-red: #c0392b;
    --accent-blue: #2980b9;
    --nav-bg: #050a08;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at center, #113626 0%, var(--bg-color) 100%);
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =========================================
   AUTHENTICATION OVERLAY
   ========================================= */
.auth-box {
    background: rgba(10, 20, 15, 0.95);
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

.auth-switch span {
    color: var(--gold);
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
}

/* =========================================
   WEBSITE WRAPPER (Nav & Footer)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    padding: 10px 40px;
    border-bottom: 2px solid var(--gold-dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    z-index: 100;
}

.nav-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
}
.nav-logo span { color: #fff; font-family: 'Playfair Display', serif;}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    transition: 0.3s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
}

.nav-btn {
    background: transparent;
    border: 1px solid #ccc;
    color: #ccc;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.nav-btn.highlight {
    border-color: #f1c40f;
    color: #f1c40f;
    animation: glow 2s infinite alternate;
}
@keyframes glow {
    from { box-shadow: 0 0 5px #f1c40f; }
    to { box-shadow: 0 0 15px #f1c40f; }
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    padding: 5px 15px;
    border-radius: 30px;
    border: 1px solid var(--gold-dark);
}

.user-info-top {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name { font-size: 0.9rem; color: #ccc; }
.nav-balance { font-size: 1.2rem; color: #2ecc71; font-weight: bold; text-shadow: 0 0 5px rgba(46, 204, 113, 0.5); }
.nav-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); background: #fff; }

.site-footer {
    background: var(--nav-bg);
    border-top: 1px solid var(--gold-dark);
    padding: 15px 40px;
    text-align: center;
    color: #888;
    position: relative;
    z-index: 100;
}

.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-links a { color: #aaa; text-decoration: none; margin-left: 20px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--gold); }
.admin-trigger { position: absolute; bottom: 0; right: 0; width: 40px; height: 40px; cursor: pointer; z-index: 999; }

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

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

.modal-box {
    background: #111;
    border: 2px solid var(--gold);
    border-radius: 10px;
    width: 400px;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.modal-header {
    background: #222;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 { color: var(--gold); margin: 0; }
.close-btn { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { color: #aaa; font-size: 0.9rem; }
.form-group input {
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
}
.form-group input:focus { outline: none; border-color: var(--gold); }

.btn-submit {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: black;
    border: none;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}
.btn-submit:hover { filter: brightness(1.2); }

.admin-msg { text-align: center; font-size: 0.9rem; margin-top: 5px; }

/* =========================================
   GAME AREA
   ========================================= */
.main-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow: hidden;
}

.casino-app { width: 100%; max-width: 1400px; height: 100%; display: flex; flex-direction: column; gap: 10px; }

.top-section {
    display: flex; justify-content: space-between; align-items: center;
    height: 180px; background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--zone-border); border-radius: 15px; padding: 10px 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.roadmap { width: 250px; height: 100%; background: var(--zone-bg); border: 1px solid var(--zone-border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; overflow: hidden; }
.roadmap-title { font-family: 'Cinzel', serif; color: var(--gold); font-size: 1rem; text-align: center; margin-bottom: 5px; border-bottom: 1px solid var(--zone-border); padding-bottom: 5px; }

/* CHAT STYLES */
.chat-container { display: flex; flex-direction: column; flex: 1; min-height: 0; height: 100%; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 5px; margin-bottom: 5px; background: rgba(0,0,0,0.5); border-radius: 5px; font-size: 0.85rem; word-break: break-all; word-wrap: break-word; min-height: 0; }
.chat-msg { margin-bottom: 5px; }
.chat-time { color: #888; font-size: 0.75rem; }
.chat-input-area { display: flex; gap: 5px; }
.chat-input-area input { flex: 1; background: #222; border: 1px solid #444; color: #fff; padding: 5px 10px; border-radius: 5px; font-size: 0.9rem; }
.chat-input-area input:focus { outline: none; border-color: var(--gold); }
.chat-input-area button { background: var(--gold); color: #000; border: none; padding: 5px 15px; border-radius: 5px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.chat-input-area button:hover { background: var(--gold-light); }
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 5px; }

.stats-box p { font-size: 1.1rem; font-weight: bold; margin: 5px 0; display: flex; justify-content: space-between; border-bottom: 1px dashed #333; padding-bottom: 5px; }

.dome-container { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; }
.dome { width: 250px; height: 100px; background: radial-gradient(ellipse at bottom, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.8) 100%); border: 2px solid var(--gold); border-bottom: 5px solid var(--gold-dark); border-radius: 125px 125px 10px 10px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 15px; gap: 15px; box-shadow: inset 0 20px 20px rgba(255,255,255,0.05), 0 10px 20px rgba(0,0,0,0.8); position: relative; margin-bottom: 10px; }
.dice { font-size: 3rem; color: #fff; text-shadow: 2px 2px 5px rgba(0,0,0,0.5); background: #e74c3c; width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; border-radius: 10px; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); line-height: 1; }
.dome-display { display: flex; align-items: center; gap: 20px; }
.timer { font-size: 2.5rem; font-family: 'Cinzel', serif; font-weight: bold; color: #2ecc71; text-shadow: 0 0 10px #2ecc71; background: rgba(0,0,0,0.8); padding: 5px 15px; border-radius: 10px; border: 1px solid #2ecc71; min-width: 80px; text-align: center; }
.result-display { font-size: 1.5rem; font-weight: bold; color: var(--gold); letter-spacing: 2px; }

.betting-board { flex: 1; display: grid; grid-template-columns: 180px 1fr 180px; gap: 15px; background: rgba(0, 0, 0, 0.4); border: 3px solid var(--gold); border-radius: 15px; padding: 15px; position: relative; }
.center-grid { display: flex; flex-direction: column; gap: 10px; }
.board-row { display: flex; gap: 10px; flex: 1; }
.zone { background: var(--zone-bg); border: 1px solid var(--zone-border); border-radius: 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; transition: all 0.2s; text-align: center; position: relative; padding: 5px; }
.zone:hover { background: var(--zone-hover); border-color: var(--gold); box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.2); }
.payout { font-size: 0.85rem; color: var(--gold); margin-top: 5px; font-family: 'Playfair Display', serif; }

.side-zone { border: 2px solid; justify-content: space-evenly; }
.small-zone { border-color: var(--accent-blue); }
.small-zone h2 { color: var(--accent-blue); font-size: 3rem; font-family: 'Cinzel', serif;}
.big-zone { border-color: var(--accent-red); }
.big-zone h2 { color: var(--accent-red); font-size: 3rem; font-family: 'Cinzel', serif;}
.side-zone .desc { font-size: 1.1rem; }
.side-zone .alert { font-size: 0.8rem; color: #aaa; font-style: italic; }

.top-row { flex: 1.5; }
.zone-group { display: flex; gap: 5px; flex: 1; }
.specific-doubles { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 5px; }
.triples { flex: 1; display: flex; gap: 5px; }
.any-triple { flex: 1; border-color: #9b59b6; }
.any-triple h3 { color: #9b59b6; font-size: 1.2rem; }
.specific-triples { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 5px; }
.mini-zone { font-size: 0.9rem; }

.totals-row { flex: 1; display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.total-zone { font-size: 1.1rem; font-weight: bold; }
.single-row { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.single-zone { font-size: 1.2rem; }

.controls-section { height: 100px; display: flex; justify-content: space-between; align-items: center; background: rgba(0, 0, 0, 0.6); border: 2px solid var(--zone-border); border-radius: 15px; padding: 10px 20px; }
.player-info { display: flex; gap: 20px; }
.info-box { background: rgba(0,0,0,0.8); border: 1px solid var(--gold-dark); padding: 10px 20px; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; }
.info-box span { font-size: 0.8rem; color: #aaa; margin-bottom: 5px; }
.info-box div { font-size: 1.5rem; color: var(--gold); font-weight: bold; font-family: 'Cinzel', serif; }

.chip-tray { display: flex; gap: 15px; align-items: center; background: rgba(255,255,255,0.05); padding: 10px 20px; border-radius: 40px; border: 1px solid rgba(255,255,255,0.1); }
.chip { width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1.2rem; color: #fff; cursor: pointer; border: 4px dashed rgba(255,255,255,0.3); box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 5px 10px rgba(0,0,0,0.5); transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-shadow: 1px 1px 2px #000; }
.chip:hover { transform: translateY(-5px); }
.chip.active { transform: translateY(-15px) scale(1.1); box-shadow: 0 10px 20px rgba(0,0,0,0.8), 0 0 15px var(--gold); border-color: var(--gold); }
.chip-10 { background: radial-gradient(circle, #7f8c8d, #34495e); }
.chip-50 { background: radial-gradient(circle, #2ecc71, #27ae60); }
.chip-100 { background: radial-gradient(circle, #3498db, #2980b9); }
.chip-500 { background: radial-gradient(circle, #9b59b6, #8e44ad); }
.chip-1000 { background: radial-gradient(circle, #e74c3c, #c0392b); }
.chip-5000 { background: radial-gradient(circle, #f1c40f, #f39c12); color: black; text-shadow: none;}

.action-buttons { display: flex; gap: 10px; }
.btn { padding: 15px 25px; font-size: 1rem; font-weight: bold; border: none; border-radius: 10px; cursor: pointer; transition: 0.2s; font-family: 'Roboto', sans-serif; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-undo { background: #7f8c8d; color: white; }
.btn-clear { background: #e74c3c; color: white; }
.btn:hover:not(:disabled) { transform: scale(1.05); filter: brightness(1.2); }

/* TABLE STYLES */
.history-table { width: 100%; border-collapse: collapse; color: #fff; font-size: 0.9rem; }
.history-table th, .history-table td { border: 1px solid #444; padding: 10px; text-align: center; }
.history-table th { background: #222; color: var(--gold); position: sticky; top: 0; }
.history-table tr:nth-child(even) { background: rgba(255,255,255,0.05); }

