/* ================================================================
   NEW ORIGINALS — CRASH
   Panel styling that follows the site palette (deep navy + cyan).
================================================================ */

/* ── Shared bits ──────────────────────────────────────────────── */
.ng-preset-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.ng-preset {
    flex: 1 1 0;
    min-width: 38px;
    padding: 7px 6px;
    border-radius: 7px;
    border: 1px solid var(--border-color, #25294e);
    background: var(--bg-input, #1a1f44);
    color: var(--text-secondary, #8b949e);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ng-preset:hover {
    color: #fff;
    border-color: rgba(38, 208, 196, 0.5);
}
.ng-preset.active {
    color: #04121a;
    border-color: transparent;
    background: linear-gradient(135deg, #26d0c4, #0e7490);
}

.ng-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 14px 0 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary, #8b949e);
}
.ng-field-label b {
    color: #26d0c4;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    font-size: 12px;
}

.ng-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.55);
    background: var(--bg-input, #1a1f44);
    color: var(--text-primary, #e6edf3);
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.42);
    font-variant-numeric: tabular-nums;
}
.ng-input:focus { border-color: rgba(38, 208, 196, 0.45); }

.ng-start-btn {
    width: 100%;
    margin-top: 14px;
    padding: 15px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #26d0c4, #0e7490);
    color: #04121a;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 26px -14px rgba(38, 208, 196, 0.9);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.ng-start-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px -14px rgba(38, 208, 196, 0.95);
}
.ng-start-btn:disabled {
    filter: grayscale(0.45) brightness(0.7);
    cursor: not-allowed;
    box-shadow: none;
}
.ng-start-btn.is-stop {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 12px 26px -14px rgba(239, 68, 68, 0.9);
}

.ng-cashout-btn {
    width: 100%;
    margin-top: 14px;
    padding: 16px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1ad093, #0f9f72);
    color: #022c1c;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px -12px rgba(26, 208, 147, 0.85);
    transition: transform 0.15s, box-shadow 0.15s;
    font-variant-numeric: tabular-nums;
}
.ng-cashout-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ng-cashout-btn:disabled { filter: grayscale(0.4) brightness(0.75); cursor: not-allowed; }

.ng-profit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 10px 13px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    font-size: 12px;
    color: var(--text-secondary, #8b949e);
}
.ng-profit b {
    color: #4ade80;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* Progress (auto mode) */
.pf-progress { margin-top: 10px; }
.pf-progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary, #8b949e);
    margin-bottom: 6px;
}
.pf-progress-bg {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}
.pf-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #26d0c4, #1ad093);
    transition: width 0.22s ease;
}
.pf-countbox { display: flex; gap: 8px; align-items: stretch; }
.pf-countbox input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 7px;
    border: 1px solid var(--border-color, #25294e);
    background: var(--bg-input, #1a1f44);
    color: var(--text-primary, #e6edf3);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}
.pf-inf {
    width: 44px;
    border-radius: 7px;
    border: 1px solid var(--border-color, #25294e);
    background: var(--bg-input, #1a1f44);
    color: var(--text-secondary, #8b949e);
    font-size: 17px;
    cursor: pointer;
}
.pf-inf.on {
    color: #04121a;
    border-color: transparent;
    background: linear-gradient(135deg, #26d0c4, #0e7490);
}

/* ══════════════════════════════════════════════════════════════
   CRASH
   Colours follow the site theme: navy surface, cyan climb,
   accent-red break, gold accents for the control panel.
══════════════════════════════════════════════════════════════ */
.crash-stage {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid rgba(38, 208, 196, 0.16);
    background:
        radial-gradient(120% 130% at 50% -20%, rgba(38, 208, 196, 0.12), transparent 62%),
        linear-gradient(180deg, rgba(19, 24, 58, 0.94), rgba(7, 11, 36, 0.98));
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 28px 60px -40px rgba(0, 0, 0, 0.95);
}
.crash-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
    z-index: 0;
}
.crash-canvas-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    z-index: 1;
}
.crash-canvas { display: block; width: 100%; height: 100%; }

.crash-readout {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}
.crash-mult {
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: clamp(44px, 8vw, 84px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #eafcff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 12px 46px rgba(0, 0, 0, 0.7);
    transition: color 0.15s;
}
.crash-mult.rising {
    color: #7ff5ea;
    text-shadow: 0 0 44px rgba(38, 208, 196, 0.45);
}
.crash-mult.cashed {
    color: #4ade80;
    text-shadow: 0 0 44px rgba(74, 222, 128, 0.45);
}
.crash-mult.crashed {
    color: #ff6b8a;
    text-shadow: 0 0 44px rgba(250, 48, 96, 0.45);
}
.crash-status {
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(7, 11, 36, 0.62);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93a2c4;
}
.crash-status b {
    color: #eafcff;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}
.crash-history {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 6px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(7, 11, 36, 0.5);
    overflow-x: auto;
    scrollbar-width: none;
}
.crash-history::-webkit-scrollbar { display: none; }
.crash-chip {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #8b949e);
    background: rgba(255, 255, 255, 0.03);
}
.crash-chip.low {
    color: #fda4af;
    border-color: rgba(250, 48, 96, 0.3);
    background: rgba(250, 48, 96, 0.08);
}
.crash-chip.mid {
    color: #7ff5ea;
    border-color: rgba(38, 208, 196, 0.28);
    background: rgba(38, 208, 196, 0.08);
}
.crash-chip.high {
    color: #fcd34d;
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.08);
}
.crash-chip.fresh { animation: crashChipIn 0.3s ease; }
@keyframes crashChipIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.crash-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    font-size: 11.5px;
    color: var(--text-hint, #6b7280);
}
.crash-meta b { color: #7ff5ea; font-variant-numeric: tabular-nums; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .crash-stage { border-radius: 14px; }
    .crash-history { padding: 10px 12px; }
    .crash-status { font-size: 10.5px; letter-spacing: 0.08em; }
}
