/* =========================================================
   MIDNIGHT DICE
   ========================================================= */

:root {
    --dice-bg: #09090f;
    --dice-panel: rgba(18, 18, 28, 0.92);
    --dice-panel-soft: rgba(24, 24, 38, 0.78);

    --dice-border: rgba(255, 255, 255, 0.08);
    --dice-border-strong: rgba(179, 125, 255, 0.22);

    --dice-text: #f5f3ff;
    --dice-muted: #9b98aa;

    --dice-purple: #b989ff;
    --dice-purple-strong: #9c67ff;

    --dice-green: #69e5a5;
    --dice-red: #ff6f8e;

    --dice-radius: 22px;
}


/* =========================================================
   PAGE
   ========================================================= */

body {
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(137, 82, 255, 0.10),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 85%,
            rgba(97, 69, 173, 0.08),
            transparent 40%
        ),
        var(--dice-bg);

    color: var(--dice-text);
}


.dice-page {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 48px;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.dice-topbar {
    position: relative;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;

    min-height: 64px;

    margin-bottom: 24px;
}


.dice-back-button {
    grid-column: 1;
    grid-row: 1;

    justify-self: start;

    border: 1px solid var(--dice-border);
    background: rgba(255, 255, 255, 0.025);
    color: var(--dice-text);

    min-height: 44px;
    padding: 0 18px;

    border-radius: 14px;

    font-weight: 700;
    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.dice-back-button:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--dice-border-strong);
    transform: translateY(-1px);
}


.dice-title-wrapper {
    grid-column: 2;
    grid-row: 1;

    justify-self: center;

    text-align: center;
}


.dice-eyebrow,
.dice-game-eyebrow {
    display: block;

    color: var(--dice-muted);

    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}


.dice-title {
    margin: 4px 0 0;

    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1;
}


.dice-balance-box {
    grid-column: 3;
    grid-row: 1;

    justify-self: end;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    padding: 10px 14px;

    border: 1px solid var(--dice-border);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.025);
}


.dice-balance-label {
    color: var(--dice-muted);

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}


.dice-balance-value {
    margin-top: 2px;

    font-size: 1.05rem;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.dice-layout {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 20px;
}


/* =========================================================
   PANELS
   ========================================================= */

.dice-control-panel,
.dice-game-panel {
    border: 1px solid var(--dice-border);

    border-radius: var(--dice-radius);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.022),
            rgba(255, 255, 255, 0.008)
        ),
        var(--dice-panel);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.28);
}


.dice-control-panel {
    padding: 22px;
}


.dice-game-panel {
    padding: 22px;

    min-height: 660px;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   FIELD GROUPS
   ========================================================= */

.dice-field-group {
    margin-bottom: 20px;
}


.dice-label {
    display: block;

    margin-bottom: 8px;

    color: var(--dice-muted);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}


.dice-input-wrapper,
.dice-target-input-wrapper {
    position: relative;
}


.dice-input {
    width: 100%;

    min-height: 50px;

    border: 1px solid var(--dice-border);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.035);
    color: var(--dice-text);

    padding: 0 54px 0 14px;

    outline: none;

    font: inherit;
    font-weight: 700;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}


.dice-target-input {
    padding-right: 14px;
}


.dice-input:focus {
    border-color: rgba(184, 137, 255, 0.55);

    box-shadow:
        0 0 0 3px rgba(160, 96, 255, 0.10);

    background: rgba(255, 255, 255, 0.045);
}


.dice-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


.dice-input-suffix {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--dice-muted);

    font-size: 0.8rem;
    font-weight: 800;

    pointer-events: none;
}


/* =========================================================
   QUICK BETS
   ========================================================= */

.dice-quick-bets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;

    margin-top: 8px;
}


.dice-quick-bets button {
    min-height: 36px;

    border: 1px solid var(--dice-border);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.025);
    color: var(--dice-muted);

    font-size: 0.72rem;
    font-weight: 800;

    cursor: pointer;

    transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.dice-quick-bets button.selected {
    border-color:
        rgba(184, 137, 255, .72);

    background:
        linear-gradient(
            145deg,
            rgba(141, 92, 255, .22),
            rgba(91, 46, 174, .10)
        );

    color:
        #f3eaff;

    box-shadow:
        0 0 0 1px
        rgba(184, 137, 255, .10),

        0 0 18px
        rgba(141, 92, 255, .22);

    text-shadow:
        0 0 8px
        rgba(184, 137, 255, .25);
}

.dice-quick-bets button:hover:not(:disabled) {
    color: var(--dice-text);

    border-color: rgba(184, 137, 255, 0.3);

    background: rgba(184, 137, 255, 0.08);

    transform: translateY(-1px);
}


.dice-quick-bets button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* =========================================================
   DIRECTION
   ========================================================= */

.dice-direction-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}


.dice-direction-button {
    min-height: 46px;

    border: 1px solid var(--dice-border);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.025);
    color: var(--dice-muted);

    font-weight: 900;
    letter-spacing: 0.06em;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.dice-direction-button:hover:not(:disabled) {
    color: var(--dice-text);
    transform: translateY(-1px);
}


.dice-direction-button.active {
    color: white;

    border-color: rgba(184, 137, 255, 0.42);

    background:
        linear-gradient(
            135deg,
            rgba(184, 137, 255, 0.18),
            rgba(128, 76, 255, 0.09)
        );

    box-shadow:
        inset 0 0 18px rgba(142, 87, 255, 0.08);
}


.dice-direction-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =========================================================
   SLIDER
   ========================================================= */

.dice-slider {
    width: 100%;

    margin-top: 12px;

    appearance: none;

    height: 6px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            rgba(184, 137, 255, 0.88),
            rgba(99, 75, 160, 0.55)
        );

    outline: none;
}


.dice-slider::-webkit-slider-thumb {
    appearance: none;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    border: 3px solid #f4edff;

    background: var(--dice-purple-strong);

    box-shadow:
        0 0 18px rgba(163, 96, 255, 0.45);

    cursor: grab;
}


.dice-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;

    border-radius: 50%;

    border: 3px solid #f4edff;

    background: var(--dice-purple-strong);

    box-shadow:
        0 0 18px rgba(163, 96, 255, 0.45);

    cursor: grab;
}


/* =========================================================
   STAT CARDS
   ========================================================= */

.dice-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;

    margin-bottom: 18px;
}


.dice-stat-card {
    min-height: 78px;

    padding: 12px;

    border: 1px solid var(--dice-border);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.022);

    display: flex;
    flex-direction: column;
    justify-content: center;
}


.dice-stat-card span {
    color: var(--dice-muted);

    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}


.dice-stat-card strong {
    margin-top: 4px;

    font-size: 1.05rem;
}


/* =========================================================
   ROLL BUTTON
   ========================================================= */

.dice-roll-button {
    width: 100%;
    min-height: 54px;

    border: 1px solid rgba(188, 145, 255, 0.4);
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #aa75ff,
            #7547e5
        );

    color: white;

    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.1em;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(115, 66, 221, 0.18);

    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        opacity 0.18s ease;
}


.dice-roll-button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
}


.dice-roll-button:active:not(:disabled) {
    transform: translateY(0);
}


.dice-roll-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


.dice-message {
    min-height: 20px;

    margin: 12px 0 0;

    text-align: center;

    color: var(--dice-muted);

    font-size: 0.82rem;
}


/* =========================================================
   GAME HEADER
   ========================================================= */

.dice-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}


.dice-round-state {
    display: block;

    margin-top: 4px;

    font-size: 1.05rem;
}


.dice-status {
    padding: 8px 12px;

    border: 1px solid var(--dice-border);
    border-radius: 999px;

    color: var(--dice-muted);

    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.11em;

    background: rgba(255, 255, 255, 0.025);
}


.dice-status.rolling {
    color: var(--dice-purple);

    border-color: rgba(184, 137, 255, 0.25);

    background: rgba(184, 137, 255, 0.07);
}


.dice-status.won {
    color: var(--dice-green);

    border-color: rgba(105, 229, 165, 0.25);

    background: rgba(105, 229, 165, 0.07);
}


.dice-status.lost {
    color: var(--dice-red);

    border-color: rgba(255, 111, 142, 0.25);

    background: rgba(255, 111, 142, 0.07);
}


/* =========================================================
   RESULT STAGE
   ========================================================= */

.dice-result-stage {
    flex: 1;

    min-height: 310px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    position: relative;
}


.dice-roll-orb {
    width: 190px;
    height: 190px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    position: relative;

    background:
        radial-gradient(
            circle at 38% 32%,
            rgba(218, 191, 255, 0.2),
            transparent 25%
        ),
        radial-gradient(
            circle at center,
            rgba(130, 73, 240, 0.14),
            rgba(52, 35, 86, 0.18) 65%,
            rgba(20, 18, 30, 0.9)
        );

    border: 1px solid rgba(185, 137, 255, 0.22);

    box-shadow:
        inset 0 0 60px rgba(146, 87, 255, 0.07),
        0 0 55px rgba(117, 70, 214, 0.12);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.dice-roll-orb::before {
    content: "";

    position: absolute;
    inset: 13px;

    border: 1px solid rgba(255, 255, 255, 0.04);

    border-radius: inherit;
}


.dice-roll-orb.rolling {
    animation:
        diceOrbPulse
        0.85s
        ease-in-out
        infinite
        alternate;
}


.dice-roll-orb.won {
    border-color: rgba(105, 229, 165, 0.38);

    box-shadow:
        inset 0 0 60px rgba(105, 229, 165, 0.06),
        0 0 55px rgba(105, 229, 165, 0.12);
}


.dice-roll-orb.lost {
    border-color: rgba(255, 111, 142, 0.38);

    box-shadow:
        inset 0 0 60px rgba(255, 111, 142, 0.05),
        0 0 55px rgba(255, 111, 142, 0.10);
}


@keyframes diceOrbPulse {

    from {
        transform:
            scale(0.99);
    }

    to {
        transform:
            scale(1.015);
    }

}


.dice-roll-number {
    position: relative;
    z-index: 2;

    display: block;

    width: 100%;

    padding: 0 12px;

    box-sizing: border-box;

    text-align: center;

    font-size:
        clamp(
            2.4rem,
            4.4vw,
            4.15rem
        );

    font-weight: 950;

    line-height: 1;

    letter-spacing: -0.025em;

    font-variant-numeric:
        tabular-nums;

    font-feature-settings:
        "tnum" 1;

    transform:
    translate(-15px, -2px);

    white-space: nowrap;

    text-shadow:
        0 0 24px
        rgba(
            184,
            137,
            255,
            0.16
        );
}


.dice-result-label {
    margin-top: 18px;

    color: var(--dice-muted);

    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}


/* =========================================================
   RANGE
   ========================================================= */

.dice-range-area {
    margin-top: 8px;
}


.dice-range-labels {
    display: flex;
    justify-content: space-between;

    margin-bottom: 8px;

    color: var(--dice-muted);

    font-size: 0.68rem;
    font-weight: 700;
}


.dice-range-track {
    position: relative;

    height: 44px;

    border: 1px solid var(--dice-border);
    border-radius: 14px;

    overflow: visible;

    background: rgba(255, 255, 255, 0.025);
}


.dice-range-zone {
    position: absolute;

    top: 0;
    bottom: 0;

    transition:
        left 0.2s ease,
        right 0.2s ease,
        width 0.2s ease;
}


.dice-range-zone.win {
    background:
        linear-gradient(
            90deg,
            rgba(105, 229, 165, 0.18),
            rgba(105, 229, 165, 0.06)
        );
}


.dice-range-zone.lose {
    background:
        linear-gradient(
            90deg,
            rgba(255, 111, 142, 0.05),
            rgba(255, 111, 142, 0.16)
        );
}


.dice-target-marker {
    position: absolute;

    top: -11px;

    transform: translateX(-50%);

    width: 2px;
    height: 66px;

    background: var(--dice-purple);

    box-shadow:
        0 0 16px rgba(184, 137, 255, 0.5);

    z-index: 4;

    pointer-events: none;

    transition: left 0.2s ease;
}


.dice-target-marker span {
    position: absolute;

    top: -25px;
    left: 50%;

    transform: translateX(-50%);

    padding: 4px 7px;

    border: 1px solid rgba(184, 137, 255, 0.22);
    border-radius: 8px;

    background: #15131f;

    color: var(--dice-purple);

    font-size: 0.65rem;
    font-weight: 900;
}


.dice-roll-marker {
    position: absolute;

    top: 50%;

    transform: translate(-50%, -50%);

    width: 16px;
    height: 16px;

    border-radius: 50%;

    border: 3px solid #fff;

    background: var(--dice-purple-strong);

    box-shadow:
        0 0 22px rgba(173, 110, 255, 0.55);

    opacity: 0;

    z-index: 5;

    transition:
        left 0.55s cubic-bezier(.2,.8,.2,1),
        opacity 0.18s ease;
}


.dice-roll-marker.visible {
    opacity: 1;
}


.dice-range-caption {
    margin-top: 10px;

    text-align: center;

    color: var(--dice-muted);

    font-size: 0.76rem;
}


/* =========================================================
   LAST RESULT
   ========================================================= */

.dice-last-result {
    margin-top: 20px;

    padding: 12px 14px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border: 1px solid var(--dice-border);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.018);
}


.dice-last-result span {
    color: var(--dice-muted);

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}


/* =========================================================
   HISTORY
   ========================================================= */

.dice-history-wrapper {
    margin-top: 12px;
}


.dice-history-header {
    margin-bottom: 8px;

    color: var(--dice-muted);

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}


.dice-history {
    display: flex;
    gap: 7px;

    min-height: 34px;

    overflow-x: auto;

    padding-bottom: 4px;
}


.dice-history-item {
    flex: 0 0 auto;

    padding: 7px 10px;

    border: 1px solid var(--dice-border);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.025);

    color: var(--dice-text);

    font-size: 0.72rem;
    font-weight: 800;
}


.dice-history-item.win {
    color: var(--dice-green);

    border-color: rgba(105, 229, 165, 0.18);
}


.dice-history-item.lose {
    color: var(--dice-red);

    border-color: rgba(255, 111, 142, 0.18);
}


.dice-history-empty {
    color: var(--dice-muted);

    font-size: 0.76rem;
}


/* =========================================================
   RESULT MODAL
   ========================================================= */

.dice-result-overlay {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: grid;
    place-items: center;

    padding: 20px;

    background: rgba(5, 5, 10, 0.72);

    backdrop-filter: blur(10px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}


.dice-result-overlay.open {
    opacity: 1;
    visibility: visible;
}


.dice-result-modal {
    width: min(460px, 100%);

    padding: 28px;

    border: 1px solid rgba(184, 137, 255, 0.18);

    border-radius: 22px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025),
            transparent
        ),
        #12111a;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.45);

    text-align: center;

    transform: translateY(10px) scale(0.98);

    transition: transform 0.2s ease;
}


.dice-result-overlay.open
.dice-result-modal {
    transform: translateY(0) scale(1);
}


.dice-result-icon {
    width: 62px;
    height: 62px;

    margin: 0 auto 14px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(184, 137, 255, 0.10);

    color: var(--dice-purple);

    font-size: 1.7rem;

    border: 1px solid rgba(184, 137, 255, 0.2);
}


.dice-result-title {
    margin: 0;

    font-size: 1.65rem;
}


.dice-result-text {
    margin: 8px 0 20px;

    color: var(--dice-muted);

    font-size: 0.9rem;
}


.dice-result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;

    margin-bottom: 18px;
}


.dice-result-details > div {
    padding: 12px;

    border: 1px solid var(--dice-border);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.02);
}


.dice-result-details span {
    display: block;

    color: var(--dice-muted);

    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}


.dice-result-details strong {
    display: block;

    margin-top: 4px;
}


.dice-result-button {
    width: 100%;
    min-height: 48px;

    border: 1px solid rgba(184, 137, 255, 0.3);
    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #a56dff,
            #7345df
        );

    color: white;

    font-weight: 900;

    cursor: pointer;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {

    .dice-layout {
        grid-template-columns: 1fr;
    }


    .dice-control-panel {
        order: 2;
    }


    .dice-game-panel {
        order: 1;

        min-height: 560px;
    }

}


@media (max-width: 640px) {

    .dice-page {
        width: min(100% - 20px, 1500px);

        padding-top: 14px;
    }


    .dice-topbar {
        grid-template-columns: 1fr auto;
    }


    .dice-title-wrapper {
        grid-column: 1 / -1;
        grid-row: 1;

        margin-bottom: 4px;
    }


    .dice-back-button {
        grid-column: 1;
        grid-row: 2;
    }


    .dice-balance-box {
        grid-column: 2;
        grid-row: 2;
    }


    .dice-control-panel,
    .dice-game-panel {
        padding: 16px;
    }


    .dice-quick-bets {
        grid-template-columns: repeat(3, 1fr);
    }


    .dice-stat-grid {
        grid-template-columns: 1fr;
    }


    .dice-result-stage {
        min-height: 250px;
    }


    .dice-roll-orb {
        width: 155px;
        height: 155px;
    }

}

/* =========================================================
   AUDIO CONTROL
   ========================================================= */

.dice-audio-control {
    position: absolute;

    top: 50%;
    right: 125px;

    transform: translateY(-50%);

    z-index: 5;

    display: flex;
    align-items: center;
    gap: 10px;

    height: 44px;

    padding: 0 12px;

    border: 1px solid var(--dice-border);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dice-audio-button {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    padding: 0;

    border: 0;
    outline: 0;

    background: transparent;

    cursor: pointer;

    font-size: 17px;
    line-height: 1;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}


.dice-audio-button:hover {
    transform: scale(1.08);
}


.dice-audio-button:active {
    transform: scale(0.94);
}


.dice-volume-wrap {
    width: 90px;

    display: flex;
    align-items: center;
}


.dice-volume-slider {
    width: 100%;
    height: 4px;

    margin: 0;

    appearance: none;
    -webkit-appearance: none;

    border: 0;
    border-radius: 999px;
    outline: none;

    background:
        rgba(255, 255, 255, 0.14);

    cursor: pointer;
}


.dice-volume-slider::-webkit-slider-thumb {
    width: 13px;
    height: 13px;

    appearance: none;
    -webkit-appearance: none;

    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;

    background: var(--dice-purple-strong);

    box-shadow:
        0 0 10px rgba(156, 103, 255, 0.65);

    cursor: pointer;
}


.dice-volume-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;

    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;

    background: var(--dice-purple-strong);

    box-shadow:
        0 0 10px rgba(156, 103, 255, 0.65);

    cursor: pointer;
}

/* MOBILE */

@media (max-width: 640px) {

    .dice-audio-control {
        position: static;

        grid-column: 1 / -1;
        grid-row: 3;

        justify-self: center;

        transform: none;

        margin: 6px auto 0;
    }

}

/* =========================================================
   MIDNIGHT DICE V2
   PREMIUM VISUAL UPGRADE
   ========================================================= */


/* =========================================================
   PAGE ATMOSPHERE
   ========================================================= */

body {
    position: relative;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 18% 12%,
            rgba(137, 82, 255, 0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 82% 72%,
            rgba(111, 62, 211, 0.10),
            transparent 34%
        ),
        radial-gradient(
            circle at 50% 105%,
            rgba(183, 117, 255, 0.055),
            transparent 28%
        ),
        #050509;
}


body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: 0.30;

    background-image:
        radial-gradient(
            circle,
            rgba(205, 165, 255, 0.58) 0.6px,
            transparent 0.8px
        ),
        radial-gradient(
            circle,
            rgba(230, 184, 92, 0.30) 0.5px,
            transparent 0.8px
        );

    background-size:
        97px 97px,
        173px 173px;

    background-position:
        20px 30px,
        70px 95px;

    z-index: -2;
}


body::after {
    content: "";

    position: fixed;

    width: 700px;
    height: 700px;

    left: 50%;
    top: 42%;

    transform:
        translate(-50%, -50%);

    pointer-events: none;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(129, 65, 228, 0.07),
            transparent 68%
        );

    filter: blur(35px);

    z-index: -2;
}


/* =========================================================
   PAGE
   ========================================================= */

.dice-page {
    position: relative;

    width:
        min(
            1500px,
            calc(100% - 40px)
        );

    margin: 0 auto;

    padding:
        20px
        0
        55px;
}


/* =========================================================
   TOPBAR V2
   ========================================================= */

.dice-topbar {
    position: relative;

    z-index: 20;

    min-height: 86px;

    display: grid;

    grid-template-columns:
        auto
        minmax(180px, 1fr)
        auto
        auto;

    align-items: center;

    gap: 12px;

    margin-bottom: 22px;

    padding:
        15px
        18px;

    border:
        1px solid
        rgba(255, 255, 255, 0.055);

    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            transparent 62%
        ),
        rgba(7, 6, 12, 0.88);

    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, 0.30);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}


.dice-topbar::before {
    content: "";

    position: absolute;

    left: 26px;
    right: 26px;
    top: 0;

    height: 1px;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(184, 126, 255, 0.32),
            rgba(230, 184, 92, 0.10),
            transparent
        );
}


/* BACK */

.dice-back-button {
    grid-column: 1;
    grid-row: 1;

    justify-self: start;

    min-height: 44px;

    padding:
        0
        16px;

    border:
        1px solid
        rgba(255, 255, 255, 0.075);

    border-radius: 11px;

    color:
        rgba(255, 255, 255, 0.68);

    background:
        rgba(255, 255, 255, 0.025);

    font-size: 0.72rem;
    font-weight: 850;

    transition:
        transform 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}


.dice-back-button:hover {
    transform:
        translateY(-1px);

    color: #ffffff;

    border-color:
        rgba(184, 126, 255, 0.24);

    background:
        rgba(139, 73, 255, 0.055);
}


/* TITLE */

.dice-title-wrapper {
    grid-column: 2;
    grid-row: 1;

    justify-self: center;

    text-align: center;
}


.dice-eyebrow {
    color:
        rgba(255, 255, 255, 0.30);

    font-size: 0.63rem;

    letter-spacing: 0.20em;
}


.dice-title {
    margin-top: 5px;

    font-size:
        clamp(
            1.8rem,
            2.5vw,
            2.5rem
        );

    font-weight: 950;

    letter-spacing:
        -0.04em;
}


/* =========================================================
   AUDIO — EXACT BLACKJACK STYLE
   ========================================================= */

.dice-audio-control {
    position: static;

    grid-column: 3;
    grid-row: 1;

    transform: none;

    z-index: auto;

    display: flex;
    align-items: center;

    gap: 10px;

    height: 42px;

    padding:
        0
        12px;

    border:
        1px solid
        rgba(184, 137, 255, .17);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, .025);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);
}


.dice-audio-button {
    width: 26px;
    height: 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex:
        0 0
        26px;

    padding: 0;

    border: 0;
    outline: 0;

    background:
        transparent;

    color:
        var(--dice-text);

    font-size: 14px;

    opacity: .9;

    transition:
        opacity .15s ease,
        transform .15s ease;
}


.dice-audio-button:hover {
    opacity: 1;

    transform:
        scale(1.06);
}


.dice-volume-wrap {
    width: 86px;
    min-width: 86px;

    flex:
        0 0
        86px;

    display: flex;
    align-items: center;
}


.dice-volume-slider {
    width: 86px;
    height: 4px;

    margin: 0;

    appearance: auto;
    -webkit-appearance: auto;

    border: 0;
    outline: 0;

    background:
        transparent;

    accent-color:
        #b47cff;

    cursor: pointer;
}


/* RESET OLD CUSTOM THUMB */

.dice-volume-slider::-webkit-slider-thumb {
    appearance: auto;
    -webkit-appearance: auto;

    width: auto;
    height: auto;

    border: 0;

    background:
        initial;

    box-shadow:
        none;
}


.dice-volume-slider::-moz-range-thumb {
    width: auto;
    height: auto;

    border: 0;

    background:
        initial;

    box-shadow:
        none;
}


/* =========================================================
   BALANCE V2
   ========================================================= */

.dice-balance-box {
    grid-column: 4;
    grid-row: 1;

    justify-self: end;

    min-width: 130px;
    min-height: 48px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    padding:
        8px
        13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.06);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.02);

    text-align: right;
}


.dice-balance-label {
    width: 100%;

    color:
        rgba(255, 255, 255, 0.30);

    font-size: 0.58rem;
    font-weight: 900;

    text-align: right;
}


.dice-balance-value {
    width: 100%;

    margin-top: 4px;

    color: #ffffff;

    font-size: 0.94rem;
    font-weight: 950;

    text-align: right;

    white-space: nowrap;
}


/* =========================================================
   MAIN LAYOUT V2
   ========================================================= */

.dice-layout {
    grid-template-columns:
        400px
        minmax(0, 1fr);

    gap: 17px;
}


/* =========================================================
   PREMIUM PANELS
   ========================================================= */

.dice-control-panel,
.dice-game-panel {
    position: relative;

    overflow: hidden;

    border:
        1px solid
        rgba(255, 255, 255, 0.06);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(132, 66, 232, 0.055),
            transparent 27%
        ),
        linear-gradient(
            145deg,
            rgba(14, 12, 22, 0.96),
            rgba(7, 7, 12, 0.98)
        );

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.025),

        0 26px 75px
        rgba(0, 0, 0, 0.32);
}


.dice-control-panel::before,
.dice-game-panel::before {
    content: "";

    position: absolute;

    left: 12%;
    right: 12%;
    top: 0;

    height: 1px;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(184, 122, 255, 0.27),
            transparent
        );
}


.dice-control-panel {
    padding: 24px;
}


.dice-game-panel {
    min-height: 680px;

    padding: 25px;
}


/* =========================================================
   INPUTS
   ========================================================= */

.dice-input {
    border-color:
        rgba(255, 255, 255, 0.06);

    background:
        rgba(255, 255, 255, 0.025);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.018);
}


.dice-input:focus {
    border-color:
        rgba(184, 125, 255, 0.42);

    background:
        rgba(143, 76, 255, 0.035);

    box-shadow:
        0 0 0 3px
        rgba(143, 76, 255, 0.07),

        0 0 22px
        rgba(139, 73, 255, 0.045);
}


/* =========================================================
   QUICK BETS V2
   ========================================================= */

.dice-quick-bets button {
    position: relative;

    overflow: hidden;

    border-color:
        rgba(255, 255, 255, 0.055);

    background:
        rgba(255, 255, 255, 0.024);

    transition:
        transform 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}


.dice-quick-bets button:hover:not(:disabled) {
    transform:
        translateY(-2px);

    color: #ffffff;

    border-color:
        rgba(184, 126, 255, 0.24);

    background:
        rgba(139, 73, 255, 0.075);

    box-shadow:
        0 10px 24px
        rgba(0, 0, 0, 0.20);
}


/* =========================================================
   DIRECTION SELECTOR V2
   ========================================================= */

.dice-direction-button {
    min-height: 48px;

    border-color:
        rgba(255, 255, 255, 0.055);

    background:
        rgba(255, 255, 255, 0.022);
}


.dice-direction-button.active {
    color: #ffffff;

    border-color:
        rgba(184, 126, 255, 0.38);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(184, 126, 255, 0.14),
            transparent 65%
        ),
        rgba(139, 73, 255, 0.075);

    box-shadow:
        inset 0 0 24px
        rgba(140, 73, 245, 0.055),

        0 0 18px
        rgba(139, 73, 255, 0.045);
}


/* =========================================================
   TARGET SLIDER V2
   This is gameplay slider — intentionally richer
   ========================================================= */

.dice-slider {
    height: 5px;

    background:
        linear-gradient(
            90deg,
            #7740df,
            #a45df6,
            #c58cff
        );

    box-shadow:
        0 0 12px
        rgba(151, 83, 244, 0.12);
}


.dice-slider::-webkit-slider-thumb {
    width: 17px;
    height: 17px;

    border:
        3px solid
        #f4edff;

    background:
        #9c67ff;

    box-shadow:
        0 0 0 3px
        rgba(156, 103, 255, 0.10),

        0 0 16px
        rgba(156, 103, 255, 0.48);
}


/* =========================================================
   STAT CARDS V2
   ========================================================= */

.dice-stat-card {
    position: relative;

    overflow: hidden;

    min-height: 80px;

    border-color:
        rgba(255, 255, 255, 0.055);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0.009)
        );

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}


.dice-stat-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 14px;
    bottom: 14px;

    width: 1px;

    opacity: 0;

    background:
        linear-gradient(
            transparent,
            rgba(184, 126, 255, 0.55),
            transparent
        );

    transition:
        opacity 0.22s ease;
}


.dice-stat-card:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(184, 126, 255, 0.15);

    background:
        rgba(139, 73, 255, 0.032);
}


.dice-stat-card:hover::before {
    opacity: 1;
}


/* =========================================================
   ROLL BUTTON V2
   ========================================================= */

.dice-roll-button {
    position: relative;

    min-height: 56px;

    overflow: hidden;

    border:
        1px solid
        rgba(196, 149, 255, 0.34);

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #7035d5,
            #9b51ee 55%,
            #7641dc
        );

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.12),

        0 14px 34px
        rgba(97, 42, 194, 0.22),

        0 0 22px
        rgba(145, 71, 233, 0.08);

    transition:
        transform 0.20s ease,
        filter 0.20s ease,
        box-shadow 0.20s ease;
}


.dice-roll-button::before {
    content: "";

    position: absolute;

    width: 42px;
    height: 120px;

    left: -70px;
    top: -30px;

    transform:
        rotate(25deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.16),
            transparent
        );

    transition:
        left 0.55s ease;
}


.dice-roll-button:hover:not(:disabled) {
    transform:
        translateY(-3px);

    filter:
        brightness(1.08);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.13),

        0 18px 42px
        rgba(97, 42, 194, 0.30),

        0 0 28px
        rgba(145, 71, 233, 0.12);
}


.dice-roll-button:hover::before {
    left:
        calc(100% + 30px);
}


/* =========================================================
   GAME HEADER V2
   ========================================================= */

.dice-game-header {
    padding-bottom: 16px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.045);
}


.dice-status {
    border-color:
        rgba(184, 126, 255, 0.11);

    background:
        rgba(139, 73, 255, 0.035);
}


/* =========================================================
   RESULT STAGE V2
   ========================================================= */

.dice-result-stage {
    position: relative;

    min-height: 330px;
}


.dice-result-stage::before {
    content: "";

    position: absolute;

    width: 360px;
    height: 220px;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    pointer-events: none;

    background:
        radial-gradient(
            ellipse,
            rgba(130, 60, 230, 0.13),
            transparent 67%
        );

    filter:
        blur(18px);
}


/* =========================================================
   MAIN ORB V2
   ========================================================= */

.dice-roll-orb {
    width: 210px;
    height: 210px;

    isolation: isolate;

    border:
        1px solid
        rgba(196, 143, 255, 0.26);

    background:
        radial-gradient(
            circle at 32% 22%,
            rgba(240, 218, 255, 0.16),
            transparent 20%
        ),
        radial-gradient(
            circle at 55% 57%,
            rgba(139, 73, 255, 0.18),
            rgba(33, 22, 55, 0.26) 53%,
            rgba(8, 7, 14, 0.97) 76%
        );

    box-shadow:
        inset 0 0 70px
        rgba(142, 82, 246, 0.08),

        inset 0 1px 0
        rgba(255, 255, 255, 0.06),

        0 26px 70px
        rgba(0, 0, 0, 0.34),

        0 0 65px
        rgba(127, 60, 225, 0.13);

    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}


.dice-roll-orb::before {
    inset: 14px;

    border:
        1px solid
        rgba(220, 186, 255, 0.07);

    box-shadow:
        inset 0 0 30px
        rgba(139, 73, 255, 0.035);
}


.dice-roll-orb::after {
    content: "";

    position: absolute;

    inset: -18px;

    z-index: -1;

    border:
        1px solid
        rgba(175, 106, 255, 0.07);

    border-radius: 50%;

    animation:
        diceOrbitPulse
        3.6s
        ease-in-out
        infinite;
}


@keyframes diceOrbitPulse {

    0%,
    100% {
        opacity: 0.35;

        transform:
            scale(0.96);
    }

    50% {
        opacity: 0.85;

        transform:
            scale(1.04);
    }

}


.dice-roll-number {
    transform: none;

    font-size:
        clamp(
            2.7rem,
            4.6vw,
            4.35rem
        );

    font-weight: 1000;

    text-shadow:
        0 0 28px
        rgba(184, 137, 255, 0.20);
}


/* =========================================================
   RANGE V2
   ========================================================= */

.dice-range-area {
    margin-top: 14px;
}


.dice-range-track {
    height: 48px;

    overflow: hidden;

    border-color:
        rgba(255, 255, 255, 0.06);

    background:
        rgba(255, 255, 255, 0.018);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.018);
}


.dice-range-zone.win {
    background:
        linear-gradient(
            90deg,
            rgba(105, 229, 165, 0.22),
            rgba(105, 229, 165, 0.07)
        );

    box-shadow:
        inset 0 0 18px
        rgba(105, 229, 165, 0.035);
}


.dice-range-zone.lose {
    background:
        linear-gradient(
            90deg,
            rgba(255, 111, 142, 0.045),
            rgba(255, 111, 142, 0.18)
        );
}


.dice-target-marker {
    top: 0;

    height: 100%;

    background:
        #b989ff;

    box-shadow:
        0 0 18px
        rgba(184, 137, 255, 0.58);
}


.dice-target-marker span {
    top: -30px;

    border-color:
        rgba(184, 137, 255, 0.24);

    background:
        #110d1b;

    color:
        #c69aff;

    box-shadow:
        0 8px 18px
        rgba(0, 0, 0, 0.24);
}


/* =========================================================
   LAST RESULT + HISTORY V2
   ========================================================= */

.dice-last-result {
    border-color:
        rgba(255, 255, 255, 0.055);

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.018),
            rgba(139, 73, 255, 0.022)
        );
}


.dice-history-item {
    border-color:
        rgba(255, 255, 255, 0.055);

    background:
        rgba(255, 255, 255, 0.022);

    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}


.dice-history-item:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(184, 126, 255, 0.16);
}


/* =========================================================
   RESULT MODAL V2
   ========================================================= */

.dice-result-overlay {
    background:
        rgba(2, 2, 6, 0.82);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);
}


.dice-result-modal {
    position: relative;

    overflow: hidden;

    border:
        1px solid
        rgba(184, 126, 255, 0.20);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(139, 73, 255, 0.12),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            rgba(17, 13, 27, 0.99),
            rgba(6, 6, 11, 0.99)
        );

    box-shadow:
        0 40px 120px
        rgba(0, 0, 0, 0.65),

        0 0 55px
        rgba(127, 60, 226, 0.08);
}


.dice-result-modal::before {
    content: "";

    position: absolute;

    left: 12%;
    right: 12%;
    top: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(190, 132, 255, 0.50),
            transparent
        );
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {

    .dice-topbar {
        grid-template-columns:
            auto
            1fr
            auto;
    }


    .dice-title-wrapper {
        grid-column: 2;
    }


    .dice-audio-control {
        grid-column: 3;
    }


    .dice-balance-box {
        grid-column:
            1 / -1;

        grid-row: 2;

        justify-self: end;

        margin-top: 2px;
    }


    .dice-layout {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .dice-page {
        width:
            min(
                calc(100% - 18px),
                1500px
            );

        padding-top: 9px;
    }


    .dice-topbar {
        grid-template-columns:
            1fr
            auto;

        gap: 10px;

        padding: 13px;

        border-radius: 15px;
    }


    .dice-title-wrapper {
        grid-column:
            1 / -1;

        grid-row: 1;

        margin-bottom: 2px;
    }


    .dice-back-button {
        grid-column: 1;
        grid-row: 2;
    }


    .dice-balance-box {
        grid-column: 2;
        grid-row: 2;

        margin: 0;
    }


    .dice-audio-control {
        grid-column:
            1 / -1;

        grid-row: 3;

        justify-self: center;

        margin:
            3px
            auto
            0;
    }


    .dice-control-panel,
    .dice-game-panel {
        padding: 16px;
    }


    .dice-game-panel {
        min-height: 560px;
    }


    .dice-roll-orb {
        width: 168px;
        height: 168px;
    }


    .dice-result-stage {
        min-height: 270px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .dice-roll-orb::after {
        animation: none !important;
    }

}

/* =========================================================
   DICE ROLL NUMBER — PERFECT CENTER ALIGNMENT
   ========================================================= */

.dice-roll-number {
    width: auto;

    padding: 0;

    text-align: center;

    transform:
        translateX(0px);

    white-space: nowrap;
}

/* =========================================================
   DICE — FINAL MOBILE SAFETY / POLISH
   ========================================================= */

@media (max-width: 680px) {

    html,
    body {
        width: 100%;
        max-width: 100%;

        overflow-x: hidden;
    }

    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    button,
    input {
        touch-action: manipulation;

        -webkit-tap-highlight-color:
            transparent;
    }


    /* =====================================================
       PAGE
       ===================================================== */

    .dice-page {
        width:
            calc(100% - 12px);

        max-width: 100%;

        margin:
            0 auto;

        padding-bottom:
            calc(
                26px +
                env(safe-area-inset-bottom)
            );

        box-sizing: border-box;
    }


    /* =====================================================
       TOPBAR
       ===================================================== */

    .dice-topbar {
        width: 100%;

        grid-template-columns:
            1fr
            auto;

        gap: 10px;

        padding: 12px;

        box-sizing: border-box;
    }

    .dice-title-wrapper {
        grid-column:
            1 / -1;

        grid-row: 1;

        text-align: center;
    }

    .dice-back-button {
        grid-column: 1;
        grid-row: 2;

        justify-self: start;

        min-height: 42px;
    }

    .dice-audio-control {
        grid-column: 2;
        grid-row: 2;

        width: auto;
        min-width: 0;

        height: 42px;

        padding:
            0
            9px;

        gap: 7px;
    }


    /* =====================================================
       AUDIO SLIDER
       ===================================================== */

    .dice-volume-wrap {
        width: 64px;
        min-width: 64px;

        flex:
            0 0
            64px;
    }

    .dice-volume-slider {
        width: 64px;
    }


    /* =====================================================
       BALANCE
       ===================================================== */

    .dice-balance-box {
        grid-column:
            1 / -1;

        grid-row: 3;

        justify-self: stretch;

        width: 100%;
        min-width: 0;

        min-height: 44px;

        margin-top: 1px;

        align-items: center;

        text-align: center;

        box-sizing: border-box;
    }

    .dice-balance-label,
    .dice-balance-value {
        text-align: center;
    }


    /* =====================================================
       MAIN LAYOUT
       ===================================================== */

    .dice-layout {
        width: 100%;
        max-width: 100%;

        grid-template-columns:
            1fr;

        gap: 12px;

        box-sizing: border-box;
    }

    .dice-layout > * {
        min-width: 0;
    }


    /* =====================================================
       PANELS
       ===================================================== */

    .dice-control-panel,
    .dice-game-panel {
        width: 100%;
        max-width: 100%;

        min-width: 0;

        padding: 16px;

        box-sizing: border-box;
    }

    .dice-game-panel {
        min-height: 540px;
    }


    /* =====================================================
       INPUT
       ===================================================== */

    .dice-input {
        width: 100%;
        max-width: 100%;

        min-height: 46px;

        box-sizing: border-box;
    }


    /* =====================================================
       QUICK BETS
       ===================================================== */

    .dice-quick-bets {
        width: 100%;

        grid-template-columns:
            repeat(
                3,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 6px;
    }

    .dice-quick-bets button {
        min-width: 0;
        min-height: 42px;

        padding:
            0
            6px;
    }


    /* =====================================================
       DIRECTION BUTTONS
       ===================================================== */

    .dice-direction-selector {
        width: 100%;

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 7px;
    }

    .dice-direction-button {
        min-width: 0;

        min-height: 48px;
    }


    /* =====================================================
       TARGET SLIDER
       ===================================================== */

    .dice-slider-wrap,
    .dice-target-slider-wrap {
        width: 100%;
        max-width: 100%;
    }

    .dice-slider {
        width: 100%;
    }


    /* =====================================================
       STAT CARDS
       ===================================================== */

    .dice-stats,
    .dice-stat-grid {
        width: 100%;

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 7px;
    }

    .dice-stat-card {
        min-width: 0;

        box-sizing: border-box;
    }


    /* =====================================================
       ROLL BUTTON
       ===================================================== */

    .dice-roll-button {
        width: 100%;

        min-height: 54px;

        touch-action: manipulation;
    }


    /* =====================================================
       RESULT STAGE
       ===================================================== */

    .dice-result-stage {
        width: 100%;
        max-width: 100%;

        min-height: 280px;

        overflow: hidden;

        box-sizing: border-box;
    }


    /* =====================================================
       MAIN ORB
       ===================================================== */

    .dice-roll-orb {
        width:
            min(
                55vw,
                190px
            );

        height:
            min(
                55vw,
                190px
            );

        max-width: 190px;
        max-height: 190px;
    }

    .dice-roll-number {
        max-width: 100%;

        font-size:
            clamp(
                2.4rem,
                14vw,
                3.8rem
            );

        white-space: nowrap;
    }


    /* =====================================================
       RANGE
       ===================================================== */

    .dice-range-area,
    .dice-range-track {
        width: 100%;
        max-width: 100%;

        box-sizing: border-box;
    }


    /* =====================================================
       HISTORY
       ===================================================== */

    .dice-history {
        width: 100%;
        max-width: 100%;

        overflow-x: auto;

        -webkit-overflow-scrolling:
            touch;
    }


    /* =====================================================
       RESULT MODAL
       ===================================================== */

    .dice-result-overlay {
        padding:
            max(
                10px,
                env(safe-area-inset-top)
            )
            10px
            max(
                10px,
                env(safe-area-inset-bottom)
            );

        overflow-y: auto;

        -webkit-overflow-scrolling:
            touch;
    }

    .dice-result-modal {
        width: 100%;

        max-width:
            calc(100vw - 20px);

        max-height:
            calc(100dvh - 20px);

        overflow-y: auto;

        box-sizing: border-box;
    }


    /* =====================================================
       PERFORMANCE
       ===================================================== */

    .dice-control-panel,
    .dice-game-panel,
    .dice-result-modal {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 420px) {

    .dice-page {
        width:
            calc(100% - 8px);
    }

    .dice-topbar {
        padding: 9px;
    }

    .dice-title {
        font-size: 21px;
    }

    .dice-volume-wrap {
        width: 50px;
        min-width: 50px;

        flex-basis: 50px;
    }

    .dice-volume-slider {
        width: 50px;
    }

    .dice-control-panel,
    .dice-game-panel {
        padding: 13px;
    }

    .dice-game-panel {
        min-height: 510px;
    }

    .dice-roll-orb {
        width:
            min(
                60vw,
                170px
            );

        height:
            min(
                60vw,
                170px
            );
    }

    .dice-roll-number {
        font-size:
            clamp(
                2.2rem,
                13vw,
                3.4rem
            );
    }

    .dice-quick-bets {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }

    .dice-result-modal {
        padding:
            21px
            17px;
    }

}


/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    .dice-direction-button:hover,
    .dice-roll-button:hover,
    .dice-quick-bets button:hover,
    .dice-stat-card:hover {
        transform: none;
    }

}


/* =========================================================
   DICE NAVBAR — CRASH STYLE
   ========================================================= */

.dice-topbar {
    width: 100vw;

    height: 78px !important;
    min-height: 78px !important;

    margin-left:
        calc(50% - 50vw);

    margin-right:
        calc(50% - 50vw);

    margin-bottom:
        0;

    padding:
        0 38px !important;

    display:
        flex !important;

    align-items:
        center !important;

    justify-content:
        space-between !important;

    gap:
        0 !important;

    position:
        sticky;

    top:
        0;

    z-index:
        100;

    border-radius:
    0 !important;

    border-bottom:
        1px solid
        rgba(255, 255, 255, .05);

    background:
        rgba(6, 5, 10, .82);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}


/* =========================================================
   BRAND
   ========================================================= */

.dice-brand {
    display:
        flex;

    align-items:
        center;

    gap:
        13px;

    color:
        inherit;

    text-decoration:
        none;
}


.dice-brand-icon {
    width:
        40px;

    height:
        40px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        12px;

    color:
        #ffd98a;

    font-size:
        22px;

    background:
        linear-gradient(
            145deg,
            rgba(119, 70, 213, .28),
            rgba(25, 16, 40, .85)
        );

    border:
        1px solid
        rgba(184, 137, 255, .24);

    box-shadow:
        0 0 24px
        rgba(113, 61, 220, .16);
}


.dice-brand strong {
    display:
        block;

    font-size:
        14px;

    font-weight:
        900;

    letter-spacing:
        3px;
}


.dice-brand span {
    display:
        block;

    margin-top:
        4px;

    color:
        var(--dice-purple);

    font-size:
        9px;

    font-weight:
        800;

    letter-spacing:
        4px;
}


/* =========================================================
   LIVE STATUS
   ========================================================= */

.dice-live {
    position:
        absolute;

    left:
        50%;

    transform:
        translateX(-50%);

    padding:
        10px 15px;

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    border:
        1px solid
        rgba(68, 214, 140, .18);

    border-radius:
        999px;

    background:
        rgba(68, 214, 140, .055);

    color:
        #b9f7d8;

    font-size:
        9px;

    font-weight:
        900;

    letter-spacing:
        2px;
}


.dice-live span {
    width:
        7px;

    height:
        7px;

    border-radius:
        50%;

    background:
        var(--dice-green);

    box-shadow:
        0 0 10px
        rgba(68, 214, 140, .8);
}


/* =========================================================
   RIGHT SIDE
   ========================================================= */

.dice-user {
    display:
        flex;

    align-items:
        center;

    justify-content:
        flex-end;

    gap:
        16px;
}


/* =========================================================
   AUDIO
   ========================================================= */

.dice-audio-control {
    height:
        42px !important;

    padding:
        0 12px !important;

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    border:
        1px solid
        rgba(184, 137, 255, .17);

    border-radius:
        12px;

    background:
        rgba(255, 255, 255, .025);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);
}


.dice-audio-button {
    width:
        26px;

    height:
        26px;

    padding:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        0;

    outline:
        0;

    background:
        transparent;

    color:
        var(--dice-text);

    font-size:
        14px;

    cursor:
        pointer;

    opacity:
        .9;
}


.dice-volume-slider {
    width:
        86px !important;

    height:
        4px;

    margin:
        0;

    accent-color:
        var(--dice-purple);

    cursor:
        pointer;
}


/* =========================================================
   BALANCE
   ========================================================= */

.dice-balance {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;
}


.dice-token {
    width:
        34px;

    height:
        34px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    color:
        #1c1308;

    font-weight:
        900;

    background:
        linear-gradient(
            145deg,
            #ffe09b,
            #b87928
        );

    box-shadow:
        0 0 16px
        rgba(255, 205, 107, .18);
}


.dice-balance span {
    display:
        block;

    color:
        var(--dice-muted);

    font-size:
        8px;

    font-weight:
        800;

    letter-spacing:
        1.8px;
}


.dice-balance strong {
    display:
        block;

    margin-top:
        3px;

    font-size:
        14px;
}


/* =========================================================
   BACK BUTTON
   ========================================================= */

.dice-back {
    min-height:
        39px;

    padding:
        0 16px;

    border:
        1px solid
        rgba(255, 255, 255, .08);

    border-radius:
        10px;

    background:
        rgba(255, 255, 255, .025);

    color:
        var(--dice-text);

    font-size:
        10px;

    font-weight:
        800;

    letter-spacing:
        1px;

    cursor:
        pointer;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease;
}


.dice-back:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(184, 137, 255, .26);

    background:
        rgba(141, 92, 255, .07);
}

/* =========================================================
   DICE NAVBAR — FINAL POSITION FIX
   ========================================================= */

.dice-page {
    padding-top: 0 !important;
}


.dice-topbar {
    margin-bottom: 24px !important;

    border-radius: 0 !important;
}

/* =========================================================
   MIDNIGHT AUDIO UI — DICE
   VISUAL ONLY / FUNCTION UNCHANGED
   ========================================================= */

.dice-audio-control {
    position: relative;
    overflow: hidden;

    border:
        1px solid
        rgba(167, 102, 255, 0.20) !important;

    border-radius:
        12px !important;

    background:
        radial-gradient(
            circle at 18% 10%,
            rgba(175, 110, 255, 0.08),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            rgba(25, 17, 39, 0.88),
            rgba(9, 8, 15, 0.94)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        inset 0 0 18px rgba(132, 67, 230, 0.025),
        0 7px 22px rgba(0, 0, 0, 0.22) !important;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* Finom felső lila fény */

.dice-audio-control::before {
    content: "";

    position: absolute;

    left: 10px;
    right: 10px;
    top: 0;

    height: 1px;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(186, 126, 255, 0.40),
            transparent
        );
}


/* =========================================================
   AUDIO BUTTON
   ========================================================= */

.dice-audio-button {
    position: relative;
    z-index: 2;

    width: 26px !important;
    height: 26px !important;

    flex: 0 0 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 !important;

    border:
        1px solid
        rgba(178, 113, 255, 0.18) !important;

    border-radius: 8px !important;

    background:
        radial-gradient(
            circle at 35% 22%,
            rgba(202, 158, 255, 0.10),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            rgba(37, 23, 58, 0.92),
            rgba(14, 11, 22, 0.96)
        ) !important;

    color: #d8b9ff !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 12px rgba(143, 73, 255, 0.08);

    opacity: 1 !important;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease !important;
}


.dice-audio-button:hover {
    transform:
        translateY(-1px)
        scale(1.03) !important;

    color: #f0e4ff !important;

    border-color:
        rgba(190, 126, 255, 0.40) !important;

    background:
        linear-gradient(
            145deg,
            rgba(52, 30, 81, 0.96),
            rgba(19, 13, 30, 0.98)
        ) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 0 18px rgba(143, 73, 255, 0.18);
}


.dice-audio-button:active {
    transform: scale(0.96) !important;
}


/* =========================================================
   SVG ICON WRAPPER
   ========================================================= */

#diceAudioIcon {
    width: 17px;
    height: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    line-height: 0;

    color: currentColor;

    pointer-events: none;
}


/* =========================================================
   SVG ICON
   ========================================================= */

.dice-audio-icon {
    width: 17px;
    height: 17px;

    display: block;

    color: currentColor;

    pointer-events: none;
}


/* =========================================================
   VOLUME SLIDER
   ========================================================= */

.dice-volume-slider {
    position: relative;
    z-index: 2;

    width: 86px;
    height: 4px;

    margin: 0;

    appearance: none;
    -webkit-appearance: none;

    border-radius: 999px;

    outline: none;

    cursor: pointer;

    background:
        linear-gradient(
            90deg,
            rgba(158, 86, 255, 0.76),
            rgba(193, 133, 255, 0.88)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        0 0 9px rgba(139, 73, 255, 0.08);
}


/* =========================================================
   CHROME / BRAVE / EDGE
   ========================================================= */

.dice-volume-slider::-webkit-slider-runnable-track {
    height: 4px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            rgba(121, 62, 218, 0.72),
            rgba(180, 107, 255, 0.72)
        );
}


.dice-volume-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;

    margin-top: -4px;

    appearance: none;
    -webkit-appearance: none;

    border:
        2px solid
        #c994ff;

    border-radius: 50%;

    background: #16101f;

    box-shadow:
        0 0 0 3px rgba(159, 87, 255, 0.10),
        0 0 10px rgba(174, 105, 255, 0.46);

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}


.dice-volume-slider:hover::-webkit-slider-thumb {
    transform: scale(1.10);

    box-shadow:
        0 0 0 4px rgba(159, 87, 255, 0.12),
        0 0 14px rgba(174, 105, 255, 0.62);
}


/* =========================================================
   FIREFOX
   ========================================================= */

.dice-volume-slider::-moz-range-track {
    height: 4px;

    border: 0;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.07);
}


.dice-volume-slider::-moz-range-progress {
    height: 4px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            #7c3ee1,
            #ba72ff
        );
}


.dice-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;

    border:
        2px solid
        #c994ff;

    border-radius: 50%;

    background: #16101f;

    box-shadow:
        0 0 10px
        rgba(174, 105, 255, 0.50);

    cursor: pointer;
}


/* =========================================================
   FOCUS
   ========================================================= */

.dice-audio-button:focus-visible,
.dice-volume-slider:focus-visible {
    outline:
        1px solid
        rgba(200, 147, 255, 0.65);

    outline-offset: 2px;
}

/* =========================================================
   DICE RIGHT SIDE — MINES MATCH
   ========================================================= */

.dice-user {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 16px !important;
}


.dice-audio-control {
    flex: 0 0 auto !important;

    width: auto !important;

    margin: 0 !important;

    transform: none !important;
}


.dice-volume-slider {
    width: 86px !important;
}

/* =========================================================
   DICE RIGHT SIDE — FINAL ALIGNMENT
   ========================================================= */

.dice-user {
    width: auto !important;
    flex: 0 0 auto !important;

    margin-left: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 16px !important;
}

.dice-audio-control {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

.dice-balance {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

.dice-back {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

/* =========================================================
   DICE AUDIO — FINAL POSITION FIX
   ========================================================= */

.dice-audio-control {
    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    transform: none !important;

    margin: 0 !important;
    flex: 0 0 auto !important;
}


/* =========================================================
   MIDNIGHT DICE
   FINAL RESPONSIVE DEVICE LAYER

   PHONES:
   344 / 360 / 375 / 390 / 412 / 414 / 430 / 440
   + Surface Duo narrow mode

   TABLETS / FOLD:
   iPad Mini
   iPad Air
   iPad Pro
   Surface Pro 7
   Asus Zenbook Fold

   HUB:
   Nest Hub
   Nest Hub Max 1280 x 800

   DESKTOP > 1280px UNCHANGED
   ========================================================= */


/* =========================================================
   GLOBAL RESPONSIVE SAFETY
   ========================================================= */

@media (max-width: 1280px) {

    html,
    body {
        width: 100%;
        max-width: 100%;

        overflow-x: hidden;
    }


    .dice-page {
        max-width: 100%;

        box-sizing: border-box;
    }


    .dice-layout,
    .dice-control-panel,
    .dice-game-panel,
    .dice-result-stage,
    .dice-range-area,
    .dice-range-track,
    .dice-history-wrapper {
        min-width: 0;

        box-sizing: border-box;
    }


    /* =====================================================
       GAME FIRST
       SETTINGS BELOW
       ===================================================== */

    .dice-layout {
        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr) !important;

        align-items: stretch !important;
    }


    .dice-game-panel {
        order: 1 !important;
    }


    .dice-control-panel {
        order: 2 !important;
    }


    /* =====================================================
       RESULT MODAL
       ===================================================== */

    .dice-result-overlay {
        padding:
            max(
                10px,
                env(safe-area-inset-top)
            )
            10px
            max(
                10px,
                env(safe-area-inset-bottom)
            ) !important;

        overflow-y: auto !important;

        -webkit-overflow-scrolling:
            touch;
    }


    .dice-result-modal {
        max-height:
            calc(
                100dvh - 20px
            ) !important;

        overflow-y: auto !important;

        box-sizing: border-box;
    }

}


/* =========================================================
   PHONES / NARROW SURFACE DUO
   <= 680px
   ========================================================= */

@media (max-width: 680px) {

    /* =====================================================
       PAGE
       ===================================================== */

    .dice-page {
        width:
            calc(
                100% - 8px
            ) !important;

        margin:
            0 auto !important;

        padding:
            0 0
            calc(
                24px +
                env(safe-area-inset-bottom)
            ) !important;
    }


    /* =====================================================
       NAVBAR
       TWO CLEAN ROWS
       ===================================================== */

    .dice-topbar {
        position: sticky !important;

        top: 0 !important;

        width: 100vw !important;

        height: auto !important;
        min-height: 0 !important;

        margin-left:
            calc(
                50% - 50vw
            ) !important;

        margin-right:
            calc(
                50% - 50vw
            ) !important;

        margin-bottom:
            8px !important;

        padding:
            8px !important;

        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            auto !important;

        grid-template-rows:
            auto
            auto !important;

        column-gap: 7px !important;
        row-gap: 7px !important;

        align-items: center !important;

        overflow: visible !important;

        z-index: 100 !important;
    }


    /* BRAND */

    .dice-brand {
        grid-column: 1 !important;
        grid-row: 1 !important;

        min-width: 0 !important;

        gap: 8px !important;
    }


    .dice-brand-icon {
        width: 37px !important;
        height: 37px !important;

        min-width: 37px !important;

        flex:
            0 0
            37px !important;

        font-size:
            19px !important;
    }


    .dice-brand strong {
        font-size:
            10px !important;

        letter-spacing:
            1.5px !important;

        white-space:
            nowrap !important;
    }


    .dice-brand span {
        margin-top:
            2px !important;

        font-size:
            5px !important;

        letter-spacing:
            2.3px !important;
    }


    /* LIVE */

    .dice-live {
        position: static !important;

        grid-column: 2 !important;
        grid-row: 1 !important;

        justify-self: end !important;

        left: auto !important;
        right: auto !important;
        top: auto !important;

        margin: 0 !important;

        transform:
            none !important;

        padding:
            7px
            9px !important;

        gap:
            5px !important;

        font-size:
            5.5px !important;

        letter-spacing:
            .7px !important;

        white-space:
            nowrap !important;
    }


    .dice-live span {
        width: 5px !important;
        height: 5px !important;

        flex:
            0 0
            5px !important;
    }


    /* USER ROW */

    .dice-user {
        grid-column:
            1 / -1 !important;

        grid-row:
            2 !important;

        width: 100% !important;

        min-width: 0 !important;

        display: grid !important;

        grid-template-columns:
            auto
            minmax(0, 1fr)
            auto !important;

        align-items: center !important;

        gap:
            6px !important;

        margin: 0 !important;

        padding-top:
            7px !important;

        border-top:
            1px solid
            rgba(
                255,
                255,
                255,
                .045
            );
    }


    /* AUDIO */

    .dice-audio-control {
        position: relative !important;

        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;

        width: 39px !important;
        min-width: 39px !important;

        height: 38px !important;

        padding:
            0 !important;

        gap: 0 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        margin: 0 !important;

        transform:
            none !important;

        overflow: hidden;
    }


    .dice-audio-button {
        width: 37px !important;
        height: 37px !important;

        min-width: 37px !important;

        flex:
            0 0
            37px !important;
    }


    .dice-volume-slider {
        display:
            none !important;
    }


    /* BALANCE */

    .dice-balance {
        min-width: 0 !important;

        display: flex !important;

        align-items: center !important;

        gap: 7px !important;
    }


    .dice-token {
        width: 29px !important;
        height: 29px !important;

        min-width: 29px !important;

        flex:
            0 0
            29px !important;

        font-size:
            8px !important;
    }


    .dice-balance span {
        font-size:
            5px !important;

        letter-spacing:
            .7px !important;
    }


    .dice-balance strong {
        margin-top:
            1px !important;

        font-size:
            10px !important;

        white-space:
            nowrap !important;
    }


    /* BACK */

    .dice-back {
        min-width: 0 !important;

        min-height:
            38px !important;

        padding:
            0
            9px !important;

        font-size:
            6px !important;

        letter-spacing:
            .45px !important;

        white-space:
            nowrap !important;
    }


    /* =====================================================
       LAYOUT
       ===================================================== */

    .dice-layout {
        width: 100% !important;

        gap:
            8px !important;
    }


    /* =====================================================
       GAME PANEL
       ===================================================== */

    .dice-game-panel {
        width: 100% !important;

        min-height:
            530px !important;

        padding:
            15px
            12px !important;

        border-radius:
            17px !important;
    }


    /* GAME HEADER */

    .dice-game-header {
        gap:
            8px !important;
    }


    .dice-game-eyebrow {
        font-size:
            6px !important;

        letter-spacing:
            1.2px !important;
    }


    .dice-round-state {
        margin-top:
            3px !important;

        font-size:
            10px !important;
    }


    .dice-status {
        padding:
            7px
            9px !important;

        font-size:
            6px !important;

        letter-spacing:
            .6px !important;

        white-space:
            nowrap !important;
    }


    /* =====================================================
       DICE RESULT STAGE
       ===================================================== */

    .dice-result-stage {
        width: 100% !important;

        min-height:
            260px !important;

        padding:
            15px
            0 !important;

        display: flex;

        flex-direction: column;

        align-items: center;
        justify-content: center;
    }


    .dice-roll-orb {
        width:
            min(
                52vw,
                175px
            ) !important;

        height:
            min(
                52vw,
                175px
            ) !important;

        max-width:
            175px !important;

        max-height:
            175px !important;

        flex:
            0 0
            auto;
    }


    .dice-roll-number {
        width: auto !important;

        max-width:
            100% !important;

        padding:
            0 !important;

        font-size:
            clamp(
                2.2rem,
                13vw,
                3.5rem
            ) !important;

        transform:
            none !important;

        white-space:
            nowrap !important;
    }


    .dice-result-label {
        margin-top:
            14px !important;

        font-size:
            7px !important;

        text-align:
            center !important;
    }


    /* =====================================================
       RANGE
       ===================================================== */

    .dice-range-area {
        width: 100% !important;

        margin-top:
            5px !important;
    }


    .dice-range-labels {
        font-size:
            6px !important;
    }


    .dice-range-track {
        width: 100% !important;

        height:
            39px !important;
    }


    .dice-target-marker span {
        font-size:
            6px !important;
    }


    .dice-range-caption {
        font-size:
            7px !important;

        line-height:
            1.45;

        text-align:
            center;
    }


    /* =====================================================
       LAST RESULT / HISTORY
       ===================================================== */

    .dice-last-result {
        margin-top:
            14px !important;

        padding:
            11px !important;
    }


    .dice-last-result span {
        font-size:
            5.5px !important;
    }


    .dice-last-result strong {
        font-size:
            11px !important;
    }


    .dice-history-wrapper {
        margin-top:
            12px !important;

        padding:
            11px !important;
    }


    .dice-history {
        width: 100% !important;

        max-width:
            100% !important;

        overflow-x:
            auto !important;

        overflow-y:
            hidden !important;

        -webkit-overflow-scrolling:
            touch;
    }


    /* =====================================================
       CONTROL PANEL
       ===================================================== */

    .dice-control-panel {
        width: 100% !important;

        padding:
            16px
            13px !important;

        border-radius:
            17px !important;
    }


    .dice-field-group {
        margin-bottom:
            17px !important;
    }


    .dice-label {
        margin-bottom:
            7px !important;

        font-size:
            7px !important;
    }


    /* INPUT */

    .dice-input {
        min-height:
            46px !important;

        padding:
            0
            44px
            0
            11px !important;

        font-size:
            13px !important;
    }


    /* QUICK BET */

    .dice-quick-bets {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            ) !important;

        gap:
            5px !important;
    }


    .dice-quick-bets button {
        min-width: 0 !important;

        min-height:
            37px !important;

        font-size:
            7px !important;
    }


    /* DIRECTION */

    .dice-direction-selector {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;

        gap:
            6px !important;
    }


    .dice-direction-button {
        min-width: 0 !important;

        min-height:
            43px !important;

        font-size:
            8px !important;
    }


    /* SLIDER */

    .dice-slider {
        margin-top:
            14px !important;

        height:
            6px !important;
    }


    /* STATS */

    .dice-stat-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;

        gap:
            6px !important;

        margin-bottom:
            14px !important;
    }


    .dice-stat-card {
        min-width: 0 !important;

        min-height:
            68px !important;

        padding:
            9px !important;
    }


    .dice-stat-card span {
        font-size:
            6px !important;

        line-height:
            1.35;
    }


    .dice-stat-card strong {
        margin-top:
            5px !important;

        font-size:
            11px !important;

        overflow-wrap:
            anywhere;
    }


    /* ROLL */

    .dice-roll-button {
        min-height:
            47px !important;

        font-size:
            8px !important;
    }


    .dice-message {
        font-size:
            7px !important;

        line-height:
            1.45;
    }


    /* MODAL */

    .dice-result-modal {
        width:
            calc(
                100vw - 16px
            ) !important;

        max-width:
            calc(
                100vw - 16px
            ) !important;

        padding:
            21px
            16px !important;

        border-radius:
            18px !important;
    }


    .dice-result-details {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;

        gap:
            6px !important;
    }

}


/* =========================================================
   VERY SMALL PHONES
   344 / 360 / 375 / <= 380
   ========================================================= */

@media (max-width: 380px) {

    .dice-page {
        width:
            calc(
                100% - 5px
            ) !important;
    }


    .dice-topbar {
        padding:
            7px
            6px !important;
    }


    .dice-brand-icon {
        width: 34px !important;
        height: 34px !important;

        min-width: 34px !important;

        flex-basis:
            34px !important;
    }


    .dice-brand strong {
        font-size:
            9px !important;
    }


    .dice-brand span {
        font-size:
            4.5px !important;
    }


    .dice-live {
        padding:
            6px
            7px !important;

        font-size:
            5px !important;
    }


    .dice-user {
        gap:
            4px !important;
    }


    .dice-control-panel,
    .dice-game-panel {
        padding:
            13px
            10px !important;
    }


    .dice-stat-grid {
        grid-template-columns:
            1fr !important;
    }


    .dice-roll-orb {
        width:
            155px !important;

        height:
            155px !important;
    }

}


/* =========================================================
   IPAD MINI / IPAD AIR / ASUS ZENBOOK FOLD
   681 — 900px

   IMPORTANT:
   LIVE BADGE TRUE CENTER
   RIGHT CONTROLS COMPACT SO THEY CANNOT OVERLAP
   ========================================================= */

@media (min-width: 681px) and (max-width: 900px) {

    .dice-page {
        width:
            calc(
                100% - 18px
            ) !important;

        margin:
            0 auto !important;

        padding-top:
            0 !important;
    }


    /* =====================================================
       NAVBAR
       ===================================================== */

    .dice-topbar {
        position: sticky !important;

        top: 0 !important;

        width: 100vw !important;

        height:
            74px !important;

        min-height:
            74px !important;

        margin-left:
            calc(
                50% - 50vw
            ) !important;

        margin-right:
            calc(
                50% - 50vw
            ) !important;

        margin-bottom:
            12px !important;

        padding:
            0
            14px !important;

        display:
            flex !important;

        flex-direction:
            row !important;

        align-items:
            center !important;

        justify-content:
            space-between !important;

        gap:
            8px !important;

        overflow:
            visible !important;

        z-index:
            100 !important;
    }


    /* BRAND */

    .dice-brand {
        flex:
            0 0
            auto !important;

        min-width:
            128px !important;

        gap:
            7px !important;
    }


    .dice-brand-icon {
        width:
            36px !important;

        height:
            36px !important;

        min-width:
            36px !important;

        flex:
            0 0
            36px !important;
    }


    .dice-brand strong {
        font-size:
            10px !important;

        letter-spacing:
            1.8px !important;
    }


    .dice-brand span {
        margin-top:
            2px !important;

        font-size:
            5px !important;

        letter-spacing:
            2.3px !important;
    }


    /* =====================================================
       LIVE — TRUE CENTER
       ===================================================== */

    .dice-live {
        position:
            absolute !important;

        left:
            50% !important;

        top:
            50% !important;

        right:
            auto !important;

        bottom:
            auto !important;

        margin:
            0 !important;

        transform:
            translate(
                -50%,
                -50%
            ) !important;

        padding:
            7px
            9px !important;

        gap:
            5px !important;

        font-size:
            5.5px !important;

        letter-spacing:
            .7px !important;

        white-space:
            nowrap !important;

        z-index:
            10 !important;
    }


    .dice-live span {
        width:
            5px !important;

        height:
            5px !important;

        flex:
            0 0
            5px !important;
    }


    /* =====================================================
       RIGHT CONTROLS
       ===================================================== */

    .dice-user {
        width:
            auto !important;

        min-width:
            0 !important;

        flex:
            0 0
            auto !important;

        margin-left:
            auto !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            flex-end !important;

        gap:
            5px !important;
    }


    /* AUDIO */

    .dice-audio-control {
        position:
            relative !important;

        left:
            auto !important;

        right:
            auto !important;

        top:
            auto !important;

        bottom:
            auto !important;

        width:
            86px !important;

        min-width:
            86px !important;

        height:
            38px !important;

        flex:
            0 0
            86px !important;

        padding:
            0
            6px !important;

        gap:
            5px !important;

        margin:
            0 !important;

        transform:
            none !important;
    }


    .dice-audio-button {
        width:
            25px !important;

        height:
            25px !important;

        min-width:
            25px !important;

        flex:
            0 0
            25px !important;
    }


    .dice-volume-slider {
        display:
            block !important;

        width:
            45px !important;

        min-width:
            45px !important;

        flex:
            0 0
            45px !important;
    }


    /* BALANCE */

    .dice-balance {
        min-width:
            94px !important;

        gap:
            6px !important;

        flex:
            0 0
            auto !important;
    }


    .dice-token {
        width:
            28px !important;

        height:
            28px !important;

        min-width:
            28px !important;

        flex:
            0 0
            28px !important;
    }


    .dice-balance span {
        font-size:
            4.5px !important;

        letter-spacing:
            .7px !important;

        white-space:
            nowrap !important;
    }


    .dice-balance strong {
        margin-top:
            1px !important;

        font-size:
            8.5px !important;

        white-space:
            nowrap !important;
    }


    /* BACK */

    .dice-back {
        min-width:
            92px !important;

        min-height:
            37px !important;

        flex:
            0 0
            92px !important;

        padding:
            0
            7px !important;

        font-size:
            5px !important;

        letter-spacing:
            .35px !important;

        white-space:
            nowrap !important;
    }


    /* =====================================================
       MAIN
       ===================================================== */

    .dice-layout {
        width:
            100% !important;

        grid-template-columns:
            minmax(0, 1fr) !important;

        gap:
            13px !important;
    }


    .dice-game-panel {
        min-height:
            620px !important;

        padding:
            23px !important;

        border-radius:
            20px !important;
    }


    .dice-control-panel {
        padding:
            23px !important;

        border-radius:
            20px !important;
    }


    /* RESULT */

    .dice-result-stage {
        min-height:
            340px !important;
    }


    .dice-roll-orb {
        width:
            205px !important;

        height:
            205px !important;
    }


    .dice-roll-number {
        transform:
            none !important;
    }


    /* CONTROLS */

    .dice-quick-bets {
        grid-template-columns:
            repeat(
                6,
                minmax(0, 1fr)
            ) !important;
    }


    .dice-stat-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            ) !important;
    }


    .dice-stat-card {
        min-width:
            0 !important;
    }


    .dice-result-details {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            ) !important;
    }

}


/* =========================================================
   IPAD PRO / SURFACE PRO 7
   901 — 1050px
   ========================================================= */

@media (min-width: 901px) and (max-width: 1050px) {

    .dice-page {
        width:
            calc(
                100% - 24px
            ) !important;

        margin:
            0 auto !important;

        padding-top:
            0 !important;
    }


    /* =====================================================
       NAVBAR
       SAME SYSTEM AS FINISHED COINFLIP / CRASH
       ===================================================== */

    .dice-topbar {
        position:
            sticky !important;

        top:
            0 !important;

        width:
            100vw !important;

        height:
            76px !important;

        min-height:
            76px !important;

        margin-left:
            calc(
                50% - 50vw
            ) !important;

        margin-right:
            calc(
                50% - 50vw
            ) !important;

        margin-bottom:
            14px !important;

        padding:
            0
            22px !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            space-between !important;

        gap:
            14px !important;

        overflow:
            visible !important;
    }


    .dice-brand {
        min-width:
            155px !important;

        flex:
            0 0
            auto !important;

        gap:
            10px !important;
    }


    .dice-brand-icon {
        width:
            40px !important;

        height:
            40px !important;

        min-width:
            40px !important;

        flex:
            0 0
            40px !important;
    }


    .dice-brand strong {
        font-size:
            12px !important;
    }


    .dice-brand span {
        font-size:
            6px !important;
    }


    /* TRUE CENTER LIVE */

    .dice-live {
        position:
            absolute !important;

        left:
            50% !important;

        top:
            50% !important;

        right:
            auto !important;

        bottom:
            auto !important;

        margin:
            0 !important;

        transform:
            translate(
                -50%,
                -50%
            ) !important;

        z-index:
            10 !important;
    }


    .dice-user {
        width:
            auto !important;

        flex:
            0 0
            auto !important;

        margin-left:
            auto !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            flex-end !important;

        gap:
            7px !important;
    }


    .dice-audio-control {
        position:
            relative !important;

        left:
            auto !important;

        right:
            auto !important;

        top:
            auto !important;

        width:
            112px !important;

        min-width:
            112px !important;

        height:
            40px !important;

        flex:
            0 0
            112px !important;

        padding:
            0
            8px !important;

        gap:
            7px !important;

        transform:
            none !important;
    }


    .dice-volume-slider {
        display:
            block !important;

        width:
            60px !important;

        min-width:
            60px !important;

        flex:
            0 0
            60px !important;
    }


    .dice-balance {
        min-width:
            122px !important;

        gap:
            7px !important;
    }


    .dice-token {
        width:
            31px !important;

        height:
            31px !important;

        min-width:
            31px !important;

        flex:
            0 0
            31px !important;
    }


    .dice-balance span {
        font-size:
            5.5px !important;
    }


    .dice-balance strong {
        font-size:
            10px !important;

        white-space:
            nowrap !important;
    }


    .dice-back {
        min-width:
            120px !important;

        min-height:
            39px !important;

        flex:
            0 0
            120px !important;

        padding:
            0
            10px !important;

        font-size:
            6px !important;

        white-space:
            nowrap !important;
    }


    /* =====================================================
       GAME
       ===================================================== */

    .dice-layout {
        width:
            100% !important;

        gap:
            14px !important;
    }


    .dice-game-panel {
        min-height:
            650px !important;

        padding:
            26px !important;
    }


    .dice-result-stage {
        min-height:
            365px !important;
    }


    .dice-roll-orb {
        width:
            220px !important;

        height:
            220px !important;
    }


    .dice-roll-number {
        transform:
            none !important;
    }


    .dice-control-panel {
        padding:
            26px !important;
    }


    .dice-quick-bets {
        grid-template-columns:
            repeat(
                6,
                minmax(0, 1fr)
            ) !important;
    }


    .dice-stat-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            ) !important;
    }

}


/* =========================================================
   SURFACE PRO 7
   901 — 960px
   EXTRA COMPACT NAVBAR
   ========================================================= */

@media (min-width: 901px) and (max-width: 960px) {

    .dice-topbar {
        height:
            72px !important;

        min-height:
            72px !important;

        padding:
            0
            14px !important;

        gap:
            8px !important;
    }


    .dice-brand {
        min-width:
            130px !important;

        gap:
            7px !important;
    }


    .dice-brand-icon {
        width:
            35px !important;

        height:
            35px !important;

        min-width:
            35px !important;

        flex-basis:
            35px !important;
    }


    .dice-brand strong {
        font-size:
            10px !important;
    }


    .dice-brand span {
        font-size:
            5px !important;
    }


    .dice-live {
        padding:
            7px
            8px !important;

        font-size:
            5.5px !important;
    }


    .dice-user {
        gap:
            5px !important;
    }


    .dice-audio-control {
        width:
            94px !important;

        min-width:
            94px !important;

        flex-basis:
            94px !important;
    }


    .dice-volume-slider {
        width:
            43px !important;

        min-width:
            43px !important;

        flex-basis:
            43px !important;
    }


    .dice-balance {
        min-width:
            105px !important;
    }


    .dice-token {
        width:
            28px !important;

        height:
            28px !important;

        min-width:
            28px !important;

        flex-basis:
            28px !important;
    }


    .dice-balance span {
        font-size:
            4.8px !important;
    }


    .dice-balance strong {
        font-size:
            9px !important;
    }


    .dice-back {
        min-width:
            105px !important;

        flex-basis:
            105px !important;

        padding:
            0
            7px !important;

        font-size:
            5.3px !important;
    }

}


/* =========================================================
   NEST HUB
   1024 x 600
   ========================================================= */

@media
    (min-width: 961px)
    and (max-width: 1050px)
    and (max-height: 650px) {

    html,
    body {
        overflow-y:
            auto !important;
    }


    .dice-topbar {
        height:
            68px !important;

        min-height:
            68px !important;

        padding:
            0
            20px !important;

        margin-bottom:
            10px !important;
    }


    .dice-brand-icon {
        width:
            38px !important;

        height:
            38px !important;

        min-width:
            38px !important;

        flex-basis:
            38px !important;
    }


    .dice-game-panel {
        min-height:
            545px !important;

        padding:
            20px !important;
    }


    .dice-result-stage {
        min-height:
            295px !important;
    }


    .dice-roll-orb {
        width:
            185px !important;

        height:
            185px !important;
    }


    .dice-control-panel {
        padding:
            22px !important;
    }

}


/* =========================================================
   LARGE FOLD / NEST HUB MAX
   1051 — 1280px
   ========================================================= */

@media (min-width: 1051px) and (max-width: 1280px) {

    .dice-page {
        width:
            calc(
                100% - 28px
            ) !important;

        max-width:
            1120px !important;

        margin:
            0 auto !important;

        padding-top:
            0 !important;
    }


    /* NAVBAR */

    .dice-topbar {
        position:
            sticky !important;

        top:
            0 !important;

        width:
            100vw !important;

        height:
            72px !important;

        min-height:
            72px !important;

        margin-left:
            calc(
                50% - 50vw
            ) !important;

        margin-right:
            calc(
                50% - 50vw
            ) !important;

        margin-bottom:
            14px !important;

        padding:
            0
            24px !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            space-between !important;

        gap:
            12px !important;
    }


    .dice-brand {
        min-width:
            165px !important;

        flex:
            0 0
            auto !important;
    }


    /* TRUE CENTER */

    .dice-live {
        position:
            absolute !important;

        left:
            50% !important;

        top:
            50% !important;

        right:
            auto !important;

        margin:
            0 !important;

        transform:
            translate(
                -50%,
                -50%
            ) !important;

        z-index:
            10 !important;
    }


    .dice-user {
        width:
            auto !important;

        margin-left:
            auto !important;

        display:
            flex !important;

        align-items:
            center !important;

        gap:
            8px !important;
    }


    .dice-audio-control {
        position:
            relative !important;

        left:
            auto !important;

        right:
            auto !important;

        top:
            auto !important;

        width:
            auto !important;

        min-width:
            118px !important;

        height:
            40px !important;

        padding:
            0
            8px !important;

        transform:
            none !important;
    }


    .dice-volume-slider {
        display:
            block !important;

        width:
            65px !important;
    }


    .dice-balance {
        min-width:
            125px !important;
    }


    .dice-back {
        min-width:
            120px !important;

        min-height:
            38px !important;

        font-size:
            6px !important;
    }


    /* GAME */

    .dice-layout {
        gap:
            14px !important;
    }


    .dice-game-panel {
        min-height:
            640px !important;

        padding:
            26px !important;
    }


    .dice-result-stage {
        min-height:
            360px !important;
    }


    .dice-roll-orb {
        width:
            220px !important;

        height:
            220px !important;
    }


    .dice-roll-number {
        transform:
            none !important;
    }


    .dice-control-panel {
        padding:
            26px !important;
    }


    .dice-quick-bets {
        grid-template-columns:
            repeat(
                6,
                minmax(0, 1fr)
            ) !important;
    }


    .dice-stat-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            ) !important;
    }

}


/* =========================================================
   NEST HUB MAX
   1280 x 800 SHORT HEIGHT
   ========================================================= */

@media
    (min-width: 1101px)
    and (max-width: 1280px)
    and (max-height: 820px) {

    html,
    body {
        overflow-y:
            auto !important;
    }


    .dice-topbar {
        height:
            68px !important;

        min-height:
            68px !important;

        margin-bottom:
            10px !important;
    }


    .dice-game-panel {
        min-height:
            550px !important;

        padding:
            21px !important;
    }


    .dice-result-stage {
        min-height:
            305px !important;
    }


    .dice-roll-orb {
        width:
            190px !important;

        height:
            190px !important;
    }


    .dice-control-panel {
        padding:
            22px !important;
    }

}


/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    .dice-back:hover,
    .dice-direction-button:hover,
    .dice-quick-bets button:hover,
    .dice-roll-button:hover,
    .dice-result-button:hover {
        transform:
            none !important;
    }

}


/* =========================================================
   MIDNIGHT DICE
   PHONE / FOLD NAVBAR AUDIO POSITION FINAL FIX

   iPhone
   Pixel
   Galaxy
   Galaxy Z Fold 5
   Surface Duo
   <= 680px

   AUDIO + BALANCE + BACK = ONE CLEAN ROW
   ========================================================= */

@media (max-width: 680px) {

    /* =====================================================
       USER ROW
       ===================================================== */

    .dice-user {
        grid-column:
            1 / -1 !important;

        grid-row:
            2 !important;

        width:
            100% !important;

        min-width:
            0 !important;

        display:
            flex !important;

        flex-direction:
            row !important;

        align-items:
            center !important;

        justify-content:
            space-between !important;

        gap:
            6px !important;

        margin:
            0 !important;

        padding-top:
            7px !important;

        border-top:
            1px solid
            rgba(
                255,
                255,
                255,
                .045
            ) !important;
    }


    /* =====================================================
       AUDIO
       LEFT SIDE OF BALANCE ROW
       ===================================================== */

    .dice-audio-control {
        position:
            relative !important;

        left:
            auto !important;

        right:
            auto !important;

        top:
            auto !important;

        bottom:
            auto !important;

        width:
            38px !important;

        min-width:
            38px !important;

        height:
            38px !important;

        flex:
            0 0
            38px !important;

        padding:
            0 !important;

        margin:
            0 !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            center !important;

        gap:
            0 !important;

        transform:
            none !important;

        overflow:
            hidden !important;

        align-self:
            center !important;
    }


    .dice-audio-button {
        width:
            36px !important;

        height:
            36px !important;

        min-width:
            36px !important;

        flex:
            0 0
            36px !important;

        margin:
            0 !important;
    }


    /* MOBILE = ICON ONLY */

    .dice-volume-slider {
        display:
            none !important;
    }


    /* =====================================================
       BALANCE
       ===================================================== */

    .dice-balance {
        min-width:
            0 !important;

        flex:
            1 1
            auto !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            flex-start !important;

        gap:
            7px !important;

        margin:
            0 !important;

        overflow:
            hidden !important;
    }


    .dice-token {
        width:
            29px !important;

        height:
            29px !important;

        min-width:
            29px !important;

        flex:
            0 0
            29px !important;
    }


    .dice-balance > div:last-child {
        min-width:
            0 !important;
    }


    .dice-balance span {
        display:
            block !important;

        font-size:
            5px !important;

        letter-spacing:
            .65px !important;

        white-space:
            nowrap !important;
    }


    .dice-balance strong {
        display:
            block !important;

        margin-top:
            1px !important;

        font-size:
            9px !important;

        white-space:
            nowrap !important;
    }


    /* =====================================================
       BACK
       ===================================================== */

    .dice-back {
        min-width:
            112px !important;

        height:
            38px !important;

        min-height:
            38px !important;

        flex:
            0 0
            112px !important;

        margin:
            0 !important;

        padding:
            0
            8px !important;

        display:
            flex !important;

        align-items:
            center !important;

        justify-content:
            center !important;

        font-size:
            5.7px !important;

        letter-spacing:
            .35px !important;

        white-space:
            nowrap !important;
    }

}


/* =========================================================
   VERY NARROW
   GALAXY Z FOLD 5 / 344px
   GALAXY S8+ / 360px
   IPHONE SE / 375px
   ========================================================= */

@media (max-width: 380px) {

    .dice-user {
        gap:
            4px !important;
    }


    .dice-audio-control {
        width:
            35px !important;

        min-width:
            35px !important;

        height:
            35px !important;

        flex-basis:
            35px !important;
    }


    .dice-audio-button {
        width:
            33px !important;

        height:
            33px !important;

        min-width:
            33px !important;

        flex-basis:
            33px !important;
    }


    .dice-token {
        width:
            27px !important;

        height:
            27px !important;

        min-width:
            27px !important;

        flex-basis:
            27px !important;
    }


    .dice-balance span {
        font-size:
            4.5px !important;
    }


    .dice-balance strong {
        font-size:
            8px !important;
    }


    .dice-back {
        min-width:
            101px !important;

        flex-basis:
            101px !important;

        padding:
            0
            6px !important;

        font-size:
            5.1px !important;
    }

}
