/* Game UI Styles */
body {
    background-color: #338833; /* Dark green background */
    margin: 0;
    font-family: Arial, sans-serif;
    user-select: none;
}
.game-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #bbb;
    border: 2px solid #555;
    position: relative;
}

/* Header */
.header {
    background: #9932CC; /* Purple */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
}
.game-title {
    color: #FFFF00; /* Yellow */
    font-size: 20px;
    margin-right: 10px;
}
.btn-result {
    background: #FF9900;
    border: 1px solid #000;
    color: #000;
    font-weight: bold;
    padding: 3px 10px;
    cursor: pointer;
    border-radius: 4px;
}
.btn-download {
    background: #32CD32;
    color: white;
    border: 1px solid #000;
    padding: 3px 10px;
    cursor: pointer;
    border-radius: 4px;
}

/* Main Body */
.main-body {
    display: flex;
    background-color: #d3d3d3;
}

/* Left Grid */
.grid-area {
    width: 65%;
    padding: 5px;
    background: #d3d3d3;
}
.bet-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 2px;
}
.all-b-row {
    margin-top: 2px;
}
.grid-cell {
    background-color: #008000; /* Green boxes */
    border: 1px solid #FFF;
    text-align: center;
    padding: 2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}
.grid-cell.all-a, .grid-cell.all-b {
    background-color: #00BFFF; /* Actually in pic all-A and all-B are green except specific texts */
    /* Wait, the picture has All-A / All-B backgrounds as green, same as numbers. */
    background-color: #008000;
}
.cell-num {
    margin-bottom: 2px;
}
.bet-input {
    width: 80%;
    margin: 0 auto;
    display: block;
    text-align: center;
    border: none;
    height: 16px;
    font-size: 12px;
}
/* Remove spinners from bet inputs */
.bet-input::-webkit-outer-spin-button,
.bet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.bet-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.bet-input:focus {
    outline: 2px solid #FFA500;
}
.empty-all {
    margin-top: 18px; /* space since it has no label */
}

.time-select-area {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    background: #d3d3d3;
    padding: 5px;
}

/* Right Results area */
.results-area {
    width: 35%;
    background-color: #d3d3d3;
    border-left: 2px solid #888;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-nav {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}
.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    background: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 3px;
}
.nav-link:hover { background: rgba(0,0,0,0.5); }
.next-lbl {
    font-size: 14px;
}
.latest-result-box {
    text-align: center;
    margin-top: 20px;
}
.latest-time {
    font-size: 24px;
    color: #000;
}
.latest-number-img-container {
    background: #000;
    display: inline-flex;
    padding: 5px;
    margin-top: 10px;
}
.latest-number-img-container img {
    height: 80px;
    width: auto;
    margin: 0 2px;
}

.history-table {
    margin-top: 10px;
    height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
}
.history-table table {
    width: 100%;
    border-collapse: collapse;
}
.history-table td {
    border: 1px solid #fff;
    padding: 12px 2px;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    width: 25%;
    vertical-align: middle;
}
.td-time {
    background-color: #0044ff;
    color: #fff;
}
.td-num {
    background-color: #880000;
    color: #fff;
    font-size: 28px;
}

/* Footer */
.footer {
    background: #004080;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 2px solid #aaa;
}
.login-form {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-form input {
    padding: 3px;
    width: 120px;
}
.login-btn {
    padding: 3px 15px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
}
.logged-in-bar {
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.btn-submit-bets, .btn-clear {
    padding: 5px 15px;
    cursor: pointer;
    font-weight: bold;
}
.btn-submit-bets { background: #32CD32; color: white; border: none; }
.btn-clear { background: #FF4500; color: white; border: none; }
