/* ============================================================
   Casher — Minimalist Design
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:        #0a0a0a;
    --bg-1:      #111111;
    --bg-2:      #181818;
    --border:    #232323;
    --border-2:  #2e2e2e;

    --text:      #f0f0f0;
    --muted:     #555555;
    --muted-2:   #888888;

    --gold:      #c9a84c;
    --gold-2:    #e8c96d;
    --green:     #4caf7d;
    --red:       #c94c4c;

    --radius:    6px;
    --radius-lg: 10px;

    /* Legacy aliases used by inline template styles */
    --primary-color:   #c9a84c;
    --secondary-color: #888888;
    --success-color:   #4caf7d;
    --danger-color:    #c94c4c;
    --warning-color:   #c9a84c;
    --dark-bg:         #111111;
    --card-bg:         #111111;
    --text-color:      #f0f0f0;
    --text-muted:      #555555;
    --accent-cyan:     #4c9ac9;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* No aurora, no grain — clean background */
.aurora { display: none; }

::selection { background: rgba(201, 168, 76, 0.25); }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

a { color: inherit; text-decoration: none; }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 56px;
    padding: 0 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.nav-brand a {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--muted-2);
    transition: color 0.15s, background 0.15s;
    font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--bg-2); }

.balance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--green);
    border: 1px solid rgba(76, 175, 125, 0.25);
    background: rgba(76, 175, 125, 0.06);
}

.btn-logout {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--muted-2);
    border: 1px solid var(--border);
    transition: color 0.15s, border-color 0.15s;
    font-weight: 500;
}
.btn-logout:hover { color: var(--red); border-color: var(--red); }

/* ============================================================
   Container
   ============================================================ */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    min-height: calc(100vh - 56px - 52px);
}

/* ============================================================
   Alerts
   ============================================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid;
    animation: fadeDown 0.25s ease;
}
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert-success { background: rgba(76, 175, 125, 0.08); border-color: rgba(76, 175, 125, 0.3); color: #7ecba0; }
.alert-error   { background: rgba(201, 76, 76, 0.08);  border-color: rgba(201, 76, 76, 0.3);  color: #e08080; }

/* ============================================================
   Shared card / surface
   ============================================================ */
.card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--gold);
    color: #0a0a0a;
    font-family: 'Unbounded', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    text-decoration: none;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-2);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); opacity: 1; }

.btn-large { width: auto; padding: 0.75rem 1.5rem; }

.btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    background: var(--bg-2);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: not-allowed;
    border: 1px solid var(--border);
}

.btn-play {
    width: 100%;
    padding: 0.85rem;
    background: var(--gold);
    color: #0a0a0a;
    font-family: 'Unbounded', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.btn-play:hover { opacity: 0.88; }
.btn-play:active { transform: scale(0.98); }
.btn-play:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--muted-2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}
.form-group input::placeholder { color: var(--muted); }
.form-group input:focus,
.form-group select:focus { border-color: var(--gold); }
.form-group select { appearance: none; cursor: pointer; }
.form-group small { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--muted); }

/* Range */
input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: var(--border-2);
    border-radius: 2px;
    outline: none;
    margin: 0.8rem 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 2px var(--gold);
}

.range-display {
    text-align: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

/* ============================================================
   Auth
   ============================================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 72vh;
}
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
}
.auth-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.auth-card h1::before { display: none; } /* no gradient text on auth */
.auth-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--muted-2);
}
.auth-link a { color: var(--gold); font-weight: 600; }

/* Separator between heading and form */
.auth-card::after {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    background: var(--gold);
    margin: 1.25rem auto 1.75rem;
}
.auth-card h1 + .form-group { margin-top: 0; }

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard h1 { margin-bottom: 2rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-1);
    padding: 1.75rem 1.5rem;
    text-align: center;
}
.stat-card h3 { margin-bottom: 0.6rem; }
.stat-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ============================================================
   Games
   ============================================================ */
.games-page h1 { margin-bottom: 2rem; }

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.game-card {
    background: var(--bg-1);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background 0.15s;
    position: relative;
    overflow: hidden;
}
.game-card::before { display: none; }
.game-card:hover { background: var(--bg-2); }
.game-card.featured { /* same, no border */ }
.game-card.coming-soon { opacity: 0.45; }
.game-card.coming-soon:hover { background: var(--bg-1); }

.game-icon { font-size: 2rem; }
.game-card h2 {
    font-size: 1.1rem;
    color: var(--text);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}
.game-card p { font-size: 0.88rem; color: var(--muted-2); flex: 1; }

/* ============================================================
   Game layout
   ============================================================ */
.game-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) { .game-container { grid-template-columns: 1fr; } }

.game-info { display: flex; flex-direction: column; gap: 1rem; }

.info-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.info-card h3 { margin-bottom: 0.5rem; }

.balance-display {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green);
}

.game-form, .mines-form, .tower-form {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.dice-game h1, .mines-game h1, .tower-game h1 {
    text-align: left;
    margin-bottom: 2rem;
}

/* Payout preview */
.payout-preview {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-align: center;
    margin: 1rem 0;
}
.payout-preview h3 { margin-bottom: 0.35rem; }
.payout-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green);
}

/* Choice buttons (dice) */
.choice-section h3 { margin-bottom: 0.75rem; }
.choice-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.choice-option input[type="radio"] { display: none; }
.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.1rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-2);
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
    gap: 0.25rem;
}
.choice-btn:hover { border-color: var(--border-2); }
.less-btn:hover { border-color: var(--red); }
.more-btn:hover { border-color: var(--green); }
.choice-option input[type="radio"]:checked + .less-btn {
    border-color: var(--red);
    background: rgba(201, 76, 76, 0.08);
}
.choice-option input[type="radio"]:checked + .more-btn {
    border-color: var(--green);
    background: rgba(76, 175, 125, 0.08);
}
.choice-icon { font-size: 1.5rem; }
.choice-text { font-weight: 700; font-size: 0.95rem; }
.choice-range { font-size: 0.78rem; color: var(--muted); }

/* Rules */
.game-rules {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.game-rules h3 { margin-bottom: 0.75rem; color: var(--gold); }
.game-rules ol { margin-left: 1.1rem; color: var(--muted-2); font-size: 0.9rem; }
.game-rules li { margin-bottom: 0.3rem; }
.rule-note {
    margin-top: 0.9rem;
    padding: 0.75rem 1rem;
    background: var(--bg-2);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--muted-2);
    border-left: 2px solid var(--gold);
}

/* Game result */
.game-result {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid;
    animation: fadeDown 0.25s ease;
}
.game-result.alert-success { background: rgba(76, 175, 125, 0.08); border-color: rgba(76, 175, 125, 0.3); color: #7ecba0; }
.game-result.alert-error   { background: rgba(201, 76, 76, 0.08);  border-color: rgba(201, 76, 76, 0.3);  color: #e08080; }

/* ============================================================
   Multiplier chips
   ============================================================ */
.multiplier-preview {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem;
    margin: 1rem 0;
}
.multiplier-preview h3 { margin-bottom: 0.6rem; }
.multipliers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.3rem;
}
.mult-item {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.2rem;
    text-align: center;
    font-size: 0.68rem;
}
.mult-item .step-num { display: block; color: var(--gold); font-weight: 700; }
.mult-item .mult-val { display: block; color: var(--green); font-weight: 700; }
.mult-item .payout-val { display: block; color: var(--muted); }

/* ============================================================
   Mines cells
   ============================================================ */
.mines-info {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--muted-2);
    font-weight: 600;
}
.mines-info span span { color: var(--text); }

.mines-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.9rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 1rem;
}
.current-payout {
    flex: 1;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
}

.grid-cells {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    max-width: 420px;
    margin: 0 auto;
}
.grid-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.3rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.grid-cell.clickable:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.06);
    transform: translateY(-1px);
}
.grid-cell.revealed { cursor: default; }
.grid-cell.safe {
    background: rgba(76, 175, 125, 0.1);
    border-color: rgba(76, 175, 125, 0.4);
}
.grid-cell.bomb {
    background: rgba(201, 76, 76, 0.1);
    border-color: rgba(201, 76, 76, 0.4);
    animation: shake 0.35s ease;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}
.cell-icon { font-size: 1.2rem; }

.btn-cashout {
    padding: 0.65rem 1.1rem;
    background: var(--green);
    color: #0a0a0a;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.btn-cashout:hover:not(:disabled) { opacity: 0.85; }
.btn-cashout:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-restart {
    padding: 0.65rem 1.1rem;
    background: var(--bg-1);
    color: var(--text);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s;
    white-space: nowrap;
}
.btn-restart:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   Admin
   ============================================================ */
.admin-panel h1 { margin-bottom: 2rem; }
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.admin-card {
    background: var(--bg-1);
    padding: 1.75rem;
}
.admin-card.admin-card-wide {
    grid-column: 1 / -1;
}
.admin-card h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    color: var(--text);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.settings-form input {
    width: 100%;
    max-width: 280px;
    padding: 0.65rem 0.85rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}
.settings-form input:focus { border-color: var(--gold); }
.settings-result {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    margin-top: 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid;
}
.settings-result.success { background: rgba(76, 175, 125, 0.08); border-color: rgba(76, 175, 125, 0.3); color: #7ecba0; }
.settings-result.error   { background: rgba(201, 76, 76, 0.08);  border-color: rgba(201, 76, 76, 0.3);  color: #e08080; }

.history-table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.history-table th,
.history-table td {
    padding: 0.6rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.history-table th {
    background: var(--bg-2);
    color: var(--muted-2);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.history-table tbody tr { transition: background 0.1s; }
.history-table tbody tr:hover { background: var(--bg-2); }
.history-table tbody tr:last-child td { border-bottom: none; }
.history-table .win-row  td:first-child { border-left: 2px solid var(--green); }
.history-table .lose-row td:first-child { border-left: 2px solid transparent; }

.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.result-badge.win  { background: rgba(76, 175, 125, 0.12); color: #7ecba0; }
.result-badge.lose { background: rgba(201, 76, 76, 0.12);  color: #e08080; }

.action-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.action-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.15s;
}
.action-radio:hover { border-color: var(--gold); }

.toggle-history {
    margin-left: auto;
    padding: 0.3rem 0.7rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted-2);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.15s, color 0.15s;
    vertical-align: middle;
}
.toggle-history:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   Footer
   ============================================================ */
footer {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
}

/* ============================================================
   Tower / floor-level accents
   ============================================================ */
.tower-visual, .tower-build, .tower-floors, .tower-controls, .tower-info {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.floor-num   { color: var(--gold); font-weight: 700; }
.floor-mult  { color: var(--green); font-weight: 700; }
.floor-payout { color: var(--text); font-weight: 600; }

/* ============================================================
   Roulette (mirrors roulette_game.html inline style vars)
   ============================================================ */
.roulette-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 1024px) { .roulette-layout { grid-template-columns: 1fr; } }

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
    .game-container { grid-template-columns: 1fr; }
    .roulette-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 720px) {
    body { font-size: 14px; }
    .navbar { padding: 0 1rem; position: sticky; }
    .container { padding: 1.25rem 0.9rem 3rem; }

    /* Typography */
    h1 { font-size: 1.4rem; }

    /* Auth */
    .auth-container { min-height: auto; padding: 1rem 0; align-items: flex-start; }
    .auth-card { border-radius: var(--radius); border-left: none; border-right: none;
                 padding: 1.75rem 1.25rem; max-width: 100%; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.4rem; }
    .stat-card { padding: 1.25rem 1rem; }

    /* Games list */
    .games-grid { grid-template-columns: 1fr; }
    .game-card { padding: 1.5rem 1.25rem; }

    /* Game panels */
    .game-form, .mines-form, .tower-form { padding: 1.25rem; }
    .info-card { padding: 1rem 1.1rem; }
    .balance-display { font-size: 1.35rem; }

    /* Mines */
    .multipliers-grid { grid-template-columns: repeat(5, 1fr); }
    .mines-controls { flex-direction: column; align-items: stretch; }
    .current-payout { text-align: center; }
    .grid-cells { max-width: 100%; gap: 3px; }
    .grid-cell { font-size: 1rem; }

    /* Admin */
    .admin-grid { grid-template-columns: 1fr; }
    .settings-form input { max-width: 100%; }
    .history-table { font-size: 0.78rem; }
    .history-table th, .history-table td { padding: 0.45rem 0.55rem; }

    /* Deposit */
    .deposit-layout { grid-template-columns: 1fr; }
    .dep-card { padding: 1.5rem 1.1rem; }

    /* Wins ticker */
    .wins-ticker-label { padding: 0 0.6rem; font-size: 0.55rem; }

    /* Footer */
    footer { font-size: 0.75rem; }

    /* Dashboard actions */
    .actions { flex-direction: column; }
    .actions .btn-primary, .actions .btn-secondary { width: 100%; text-align: center; }
}

/* Very small screens */
@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.2rem; }
    .nav-brand a { font-size: 0.9rem; }
    .balance { font-size: 0.8rem; padding: 0.35rem 0.65rem; }
}
