/* =========================================================
   DIAMONDS — CRYSTAL FORGE
========================================================= */

.diamonds-page {
    min-height: calc(100vh - 75px);
    padding: 40px 7% 70px;

    background:
        radial-gradient(
            circle at 72% 8%,
            rgba(100,125,255,.12),
            transparent 32%
        ),
        radial-gradient(
            circle at 15% 75%,
            rgba(155,80,255,.07),
            transparent 32%
        );
}


/* =========================================================
   HEADER
========================================================= */

.diamonds-header {
    max-width: 1200px;
    margin: 0 auto 30px;

    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.diamonds-back {
    margin-top: 4px;

    text-decoration: none;
    color: #858995;

    border: 1px solid #292d38;
    background: #101219;

    padding: 10px 14px;
    border-radius: 8px;

    font-size: 13px;
    transition: .2s;
}

.diamonds-back:hover {
    color: white;
    border-color: #555c6c;
}

.diamonds-header h1 {
    font-size: 38px;
    margin-top: 4px;
}

.diamonds-description {
    color: #717682;
    margin-top: 7px;
}


/* =========================================================
   LAYOUT
========================================================= */

.diamonds-layout {
    max-width: 1200px;
    margin: auto;

    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
}


/* =========================================================
   PANEL
========================================================= */

.diamond-panel {
    background:
        linear-gradient(
            180deg,
            #11141d,
            #0b0e14
        );

    border: 1px solid #272c38;
    border-radius: 15px;

    padding: 22px;

    height: fit-content;

    position: sticky;
    top: 95px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.panel-heading h2 {
    font-size: 20px;
}

.panel-heading p {
    color: #696e7a;
    font-size: 11px;
    margin-top: 5px;
}

.live-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #82d19b;

    box-shadow:
        0 0 12px rgba(100,200,130,.6);

    animation: livePulse 1.6s infinite;
}


/* =========================================================
   BET
========================================================= */

.diamond-panel label {
    display: block;

    margin-top: 25px;
    margin-bottom: 8px;

    color: #858996;
    font-size: 12px;
}

.bet-input {
    height: 44px;

    display: flex;

    overflow: hidden;

    background: #171a22;

    border: 1px solid #292d38;

    border-radius: 8px;
}

.bet-input:focus-within {
    border-color: #53628e;
    box-shadow: 0 0 0 3px rgba(85,105,170,.08);
}

.bet-input input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;

    color: white;

    padding: 12px;

    font-size: 14px;
}

.bet-input span {
    display: flex;
    align-items: center;

    padding: 0 11px;

    color: #666b77;

    font-size: 10px;
}

.quick-bets {
    display: grid;
    grid-template-columns: repeat(3,1fr);

    gap: 6px;

    margin-top: 7px;
}

.quick-bets button {
    height: 31px;

    background: #13161d;

    border: 1px solid #292d38;

    border-radius: 6px;

    color: #777c88;

    cursor: pointer;

    font-size: 10px;

    transition: .15s;
}

.quick-bets button:hover {
    color: white;
    border-color: #505663;
    background: #181c25;
}


/* =========================================================
   RISK
========================================================= */

.setting-title {
    color: #858995;

    font-size: 12px;

    margin-top: 21px;
    margin-bottom: 8px;
}

.risk-selector {
    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 5px;
}

.risk-option {
    padding: 9px 4px;

    background: #13161d;

    border: 1px solid #292d38;

    border-radius: 7px;

    cursor: pointer;

    color: #666c78;

    transition: .2s;
}

.risk-option span {
    display: block;

    font-size: 9px;
    font-weight: 900;
}

.risk-option small {
    display: block;

    margin-top: 3px;

    font-size: 7px;
}

.risk-option:hover {
    color: white;
}

.risk-option.active {
    color: white;

    border-color: #6677a8;

    background:
        linear-gradient(
            145deg,
            #202838,
            #181d27
        );

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.04),
        0 0 20px rgba(90,110,190,.07);
}

.risk-description {
    margin-top: 8px;

    color: #555c68;

    font-size: 9px;

    line-height: 1.4;
}


/* =========================================================
   POTENTIAL
========================================================= */

.potential-box {
    margin-top: 16px;

    padding: 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            135deg,
            #161c29,
            #11151e
        );

    border: 1px solid #293244;

    border-radius: 9px;
}

.potential-box span {
    display: block;

    color: #656b78;

    font-size: 9px;
}

.potential-box strong {
    display: block;

    margin-top: 4px;

    color: #b8c7ff;

    font-size: 16px;
}

.potential-multiplier {
    color: #8ea4ff;

    font-size: 13px;
    font-weight: 900;
}


/* =========================================================
   SPIN
========================================================= */

.spin-button {
    width: 100%;

    margin-top: 14px;

    padding: 15px;

    border: none;

    border-radius: 8px;

    background: white;

    color: #090a0d;

    cursor: pointer;

    font-size: 14px;
    font-weight: 900;

    transition: .2s;
}

.spin-button:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.spin-button:active {
    transform: scale(.98);
}

.spin-button:disabled {
    opacity: .45;

    cursor: not-allowed;

    transform: none;
}

.spin-icon {
    margin-right: 6px;
}


/* =========================================================
   LAST RESULT
========================================================= */

.last-result {
    margin-top: 10px;

    padding: 11px 13px;

    display: flex;
    justify-content: space-between;

    background: #151821;

    border-radius: 8px;
}

.last-result span {
    color: #666b76;

    font-size: 10px;
}

.last-result strong {
    color: #8bd09f;

    font-size: 13px;
}


/* =========================================================
   PAYTABLE
========================================================= */

.mini-paytable {
    margin-top: 18px;

    border: 1px solid #242a35;

    border-radius: 9px;

    overflow: hidden;

    background: #10131a;
}

.mini-paytable-title {
    padding: 9px 11px;

    border-bottom: 1px solid #242a35;

    color: #5f6570;

    font-size: 9px;

    letter-spacing: 1px;
}

.pay-row {
    display: flex;

    justify-content: space-between;

    padding: 9px 11px;

    border-bottom: 1px solid #1d212a;

    font-size: 10px;
}

.pay-row:last-child {
    border-bottom: none;
}

.pay-row strong {
    color: #aab9ff;
}


/* =========================================================
   LEGEND
========================================================= */

.legend {
    margin-top: 14px;

    padding: 12px;

    border: 1px solid #222832;

    border-radius: 9px;

    background: #0f1218;
}

.legend-title {
    color: #555c68;

    font-size: 8px;

    letter-spacing: 1px;

    margin-bottom: 8px;
}

.legend-row {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 6px;
}

.legend-row span {
    width: 22px;

    text-align: center;

    font-size: 14px;
}

.legend-row small {
    color: #6b717c;

    font-size: 9px;
}


/* =========================================================
   GAME
========================================================= */

.diamond-game {
    min-width: 0;

    padding: 30px 35px;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(89,108,190,.10),
            transparent 40%
        ),
        #0b0e14;

    border: 1px solid #202530;

    border-radius: 16px;
}


/* =========================================================
   TOP
========================================================= */

.game-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;
}

.game-label {
    color: #656b77;

    font-size: 9px;

    letter-spacing: 2px;

    margin-bottom: 5px;
}

.game-top h2 {
    font-size: 19px;
}

.game-status {
    padding: 8px 12px;

    background: #151820;

    border: 1px solid #292e39;

    border-radius: 7px;

    color: #747a86;

    font-size: 9px;

    font-weight: 900;
}

.game-status.spin {
    color: #aebcff;
    border-color: #47517a;
}

.game-status.win {
    color: #8fd3a0;
    border-color: #385b43;
}

.game-status.lose {
    color: #e17f88;
    border-color: #60373c;
}

.game-status.jackpot {
    color: #e6c778;
    border-color: #67562b;
}


/* =========================================================
   JACKPOT
========================================================= */

.jackpot-bar {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 11px 15px;

    margin-bottom: 18px;

    border: 1px solid #282e3b;

    border-radius: 9px;

    background:
        linear-gradient(
            90deg,
            #121620,
            #171b25,
            #121620
        );
}

.jackpot-label {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #777d89;

    font-size: 9px;

    letter-spacing: 1.2px;

    font-weight: 800;
}

.jackpot-gem {
    color: #a8baff;

    font-size: 15px;

    animation: gemPulse 2s infinite;
}

.jackpot-bar strong {
    color: #c3ccff;

    font-size: 14px;

    font-variant-numeric: tabular-nums;
}


/* =========================================================
   FORGE
========================================================= */

.forge {
    position: relative;

    padding: 55px 40px 38px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(78,98,190,.15),
            transparent 50%
        ),
        linear-gradient(
            145deg,
            #131721,
            #0b0e14
        );

    border: 1px solid #29303d;

    border-radius: 18px;

    box-shadow:
        inset 0 0 70px rgba(0,0,0,.3),
        0 20px 60px rgba(0,0,0,.25);
}

.forge::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            115deg,
            transparent 25%,
            rgba(255,255,255,.025) 50%,
            transparent 75%
        );

    background-size: 250% 100%;
}

.forge.spinning::before {
    animation: forgeSweep 1.1s linear infinite;
}


/* =========================================================
   FORGE RINGS
========================================================= */

.forge-ring {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%,-50%);

    border: 1px solid rgba(100,120,190,.08);

    border-radius: 50%;

    pointer-events: none;
}

.ring-one {
    width: 390px;
    height: 390px;

    animation: rotateRing 18s linear infinite;
}

.ring-two {
    width: 500px;
    height: 500px;

    border-style: dashed;

    animation:
        rotateRingReverse 25s linear infinite;
}


/* =========================================================
   REELS
========================================================= */

.reels {
    position: relative;
    z-index: 4;

    display: flex;

    justify-content: center;
    align-items: center;

    gap: 13px;
}

.reel-frame {
    width: 150px;
    height: 180px;

    padding: 8px;

    background:
        linear-gradient(
            145deg,
            #303744,
            #161a23
        );

    border: 1px solid #454c59;

    border-radius: 14px;

    box-shadow:
        inset 0 0 0 2px #10131a,
        0 15px 35px rgba(0,0,0,.35);

    transition: .3s;
}

.reel-frame:hover {
    border-color: #59647a;
}

.reel {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 9px;

    background:
        radial-gradient(
            circle at 50% 30%,
            #222936,
            #0c0f15
        );

    border: 1px solid #353b48;

    position: relative;
}

.reel::before,
.reel::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    height: 38px;

    z-index: 2;

    pointer-events: none;
}

.reel::before {
    top: 0;

    background:
        linear-gradient(
            #090b10,
            transparent
        );
}

.reel::after {
    bottom: 0;

    background:
        linear-gradient(
            transparent,
            #090b10
        );
}

.symbol {
    font-size: 70px;

    filter:
        drop-shadow(
            0 0 18px rgba(130,150,255,.25)
        );

    position: relative;

    z-index: 1;

    transition: .2s;
}

.reel.win .symbol {
    animation: winningSymbol .6s ease-in-out infinite alternate;
}

.reel.lose .symbol {
    filter:
        grayscale(.5)
        brightness(.7);
}


/* =========================================================
   DIVIDERS
========================================================= */

.reel-divider {
    color: #59647a;

    font-size: 16px;

    z-index: 5;
}


/* =========================================================
   PAYLINE
========================================================= */

.payline {
    position: relative;
    z-index: 4;

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 10px;

    margin-top: 20px;
}

.payline span {
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #424a59
        );
}

.payline span:last-child {
    background:
        linear-gradient(
            90deg,
            #424a59,
            transparent
        );
}

.payline div {
    color: #555c68;

    font-size: 8px;

    letter-spacing: 2px;
}


/* =========================================================
   FLOOR
========================================================= */

.forge-floor {
    position: relative;

    z-index: 4;

    display: flex;

    justify-content: center;

    gap: 55px;

    margin-top: 25px;
}

.forge-floor span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #596cff;

    box-shadow:
        0 0 16px rgba(100,120,255,.7);

    opacity: .45;
}


/* =========================================================
   LIGHTS
========================================================= */

.forge-light {
    position: absolute;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #7388ff;

    box-shadow:
        0 0 15px rgba(110,130,255,.7);

    animation: forgeBlink 1.5s infinite;

    z-index: 5;
}

.light-one {
    top: 18px;
    left: 20%;
}

.light-two {
    top: 18px;
    left: 40%;

    animation-delay: .3s;
}

.light-three {
    top: 18px;
    left: 60%;

    animation-delay: .6s;
}

.light-four {
    top: 18px;
    left: 80%;

    animation-delay: .9s;
}


/* =========================================================
   RESULT
========================================================= */

.diamond-result {
    margin-top: 14px;

    padding: 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    background: #10131a;

    border: 1px solid #222832;

    border-radius: 10px;

    transition: .25s;
}

.result-icon {
    width: 35px;
    height: 35px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #181d29;

    border: 1px solid #30384a;

    color: #aabaff;

    font-size: 17px;
}

.diamond-result strong {
    display: block;

    color: #d0d4df;

    font-size: 12px;

    text-align: center;
}

.diamond-result span {
    display: block;

    margin-top: 4px;

    color: #656b77;

    font-size: 10px;

    text-align: center;
}

.diamond-result.win {
    border-color: #385b43;
    background: #101a14;
}

.diamond-result.lose {
    border-color: #60373c;
    background: #171013;
}

.diamond-result.jackpot {
    border-color: #68582f;
    background: #191710;
}


/* =========================================================
   STATS
========================================================= */

.diamond-stats {
    display: grid;

    grid-template-columns: repeat(4,1fr);

    gap: 8px;

    margin-top: 12px;
}

.stat {
    padding: 12px;

    background: #10131a;

    border: 1px solid #202530;

    border-radius: 8px;
}

.stat span {
    display: block;

    color: #5e6470;

    font-size: 8px;

    margin-bottom: 5px;
}

.stat strong {
    color: white;

    font-size: 14px;
}


/* =========================================================
   HISTORY
========================================================= */

.history-section {
    margin-top: 35px;

    padding-top: 24px;

    border-top: 1px solid #202530;
}

.history-header {
    display: flex;

    justify-content: space-between;

    align-items: center;
}

.history-header p {
    color: #656b77;

    font-size: 9px;

    letter-spacing: 2px;
}

.history-header h2 {
    margin-top: 5px;

    font-size: 18px;
}

.history-header button {
    padding: 8px 11px;

    background: transparent;

    border: 1px solid #292e38;

    border-radius: 7px;

    color: #707681;

    cursor: pointer;

    font-size: 10px;
}

.history-header button:hover {
    color: white;
}


/* =========================================================
   HISTORY LIST
========================================================= */

.history-list {
    display: flex;

    flex-direction: column;

    gap: 7px;

    margin-top: 15px;
}

.empty-history {
    padding: 25px;

    text-align: center;

    color: #4f555f;

    background: #0f1218;

    border: 1px solid #202530;

    border-radius: 8px;

    font-size: 11px;
}

.history-item {
    display: grid;

    grid-template-columns:
        130px
        1fr
        80px
        100px;

    align-items: center;

    gap: 10px;

    min-height: 55px;

    padding: 8px 13px;

    background: #10131a;

    border: 1px solid #202530;

    border-radius: 8px;
}

.history-symbols {
    font-size: 18px;

    letter-spacing: 3px;
}

.history-type {
    color: #6b717c;

    font-size: 10px;
}

.history-multiplier {
    color: #aebcff;

    font-size: 11px;

    font-weight: 900;
}

.history-payout {
    text-align: right;

    font-size: 11px;

    font-weight: 800;
}

.history-win {
    color: #8bd09f;
}

.history-lose {
    color: #e17b83;
}

.history-jackpot {
    color: #e6c778;
}


/* =========================================================
   POPUP
========================================================= */

.popup-overlay {
    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,.65);

    backdrop-filter: blur(5px);

    opacity: 0;

    visibility: hidden;

    transition: .2s;

    z-index: 9999;
}

.popup-overlay.show {
    opacity: 1;

    visibility: visible;
}

.popup {
    width: min(380px, calc(100% - 30px));

    padding: 25px;

    background:
        linear-gradient(
            180deg,
            #171b24,
            #10131a
        );

    border: 1px solid #303642;

    border-radius: 14px;

    text-align: center;

    box-shadow:
        0 25px 70px rgba(0,0,0,.55);

    transform: translateY(10px) scale(.97);

    transition: .2s;
}

.popup-overlay.show .popup {
    transform: translateY(0) scale(1);
}

.popup-icon {
    width: 44px;
    height: 44px;

    margin: 0 auto 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #392327;

    border: 1px solid #713b40;

    color: #ff9299;

    font-weight: 900;
}

.popup h3 {
    font-size: 17px;
}

.popup p {
    margin-top: 7px;

    color: #777d88;

    font-size: 12px;

    line-height: 1.5;
}

.popup button {
    width: 100%;

    margin-top: 18px;

    padding: 11px;

    border: none;

    border-radius: 7px;

    background: white;

    color: #090a0e;

    font-weight: 800;

    cursor: pointer;
}


/* =========================================================
   ANIMATIONS
========================================================= */

.reel.spinning .symbol {
    animation:
        reelSpin .11s linear infinite;
}

.forge.spinning {
    box-shadow:
        inset 0 0 90px rgba(90,110,220,.16),
        0 0 45px rgba(90,110,220,.09);
}

@keyframes reelSpin {

    0% {
        transform:
            translateY(-22px)
            scale(.88);

        opacity: .45;
    }

    50% {
        transform:
            translateY(0)
            scale(1.06);

        opacity: 1;
    }

    100% {
        transform:
            translateY(22px)
            scale(.88);

        opacity: .45;
    }
}

@keyframes winningSymbol {

    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.13);
    }
}

@keyframes forgeBlink {

    0%,100% {
        opacity: .3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes livePulse {

    0%,100% {
        transform: scale(1);
        opacity: .5;
    }

    50% {
        transform: scale(1.4);
        opacity: 1;
    }
}

@keyframes gemPulse {

    0%,100% {
        opacity: .6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes forgeSweep {

    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@keyframes rotateRing {

    from {
        transform:
            translate(-50%,-50%)
            rotate(0deg);
    }

    to {
        transform:
            translate(-50%,-50%)
            rotate(360deg);
    }
}

@keyframes rotateRingReverse {

    from {
        transform:
            translate(-50%,-50%)
            rotate(360deg);
    }

    to {
        transform:
            translate(-50%,-50%)
            rotate(0deg);
    }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 950px) {

    .diamonds-layout {
        grid-template-columns: 1fr;
    }

    .diamond-panel {
        position: static;
    }

}

@media (max-width: 700px) {

    .diamonds-page {
        padding: 25px 15px 50px;
    }

    .diamonds-header {
        flex-direction: column;
        gap: 15px;
    }

    .diamond-game {
        padding: 22px 15px;
    }

    .forge {
        padding: 35px 10px 25px;
    }

    .reel-frame {
        width: 100px;
        height: 125px;
    }

    .symbol {
        font-size: 50px;
    }

    .diamond-stats {
        grid-template-columns: 1fr 1fr;
    }

    .history-item {
        grid-template-columns:
            90px
            1fr
            60px;
    }

    .history-payout {
        display: none;
    }

}

@media (max-width: 450px) {

    .reel-frame {
        width: 82px;
        height: 110px;
    }

    .symbol {
        font-size: 40px;
    }

    .reels {
        gap: 6px;
    }

    .reel-divider {
        font-size: 10px;
    }

    .ring-one,
    .ring-two {
        display: none;
    }

}