:root {
    --v66-orange: #ff4b0b;
    --v66-orange-dark: #d93600;
    --v66-gold: #ffc83d;
    --v66-brown: #2b140c;
    --v66-background: #f3f3f3;
    --v66-card: #ffffff;
    --v66-border: #eeeeee;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    padding: 28px 16px;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--v66-brown);
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 75, 11, 0.1),
            transparent 32%
        ),
        var(--v66-background);
}

.mines-container {
    width: 100%;
    max-width: 1100px;
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    overflow: hidden;
    background: white;
    border: 1px solid var(--v66-border);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(60, 30, 15, 0.14);
}

.mines-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    border-bottom: 3px solid var(--v66-orange);
}

.back-button {
    color: var(--v66-orange-dark);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    padding: 8px 13px;
    color: white;
    font-size: 22px;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(
        135deg,
        var(--v66-gold),
        var(--v66-orange)
    );
    border-radius: 9px;
    box-shadow: 0 5px 12px rgba(255, 75, 11, 0.25);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 14px;
    letter-spacing: 1.5px;
}

.brand small {
    margin-top: 3px;
    color: #888888;
    font-size: 9px;
    letter-spacing: 1px;
}

.chance-box {
    flex-shrink: 0;
    padding: 9px 14px;
    color: var(--v66-orange-dark);
    font-size: 13px;
    font-weight: 700;
    background: #fff0e9;
    border: 1px solid rgba(255, 75, 11, 0.3);
    border-radius: 999px;
}

.mines-intro {
    padding: 30px 20px;
    color: white;
    text-align: center;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 225, 105, 0.27),
            transparent 45%
        ),
        linear-gradient(
            135deg,
            var(--v66-orange),
            #ff7900
        );
}

.mines-intro span {
    color: #fff1b7;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 4px;
}

.mines-intro h1 {
    margin: 8px 0 9px;
    font-size: clamp(32px, 6vw, 50px);
    line-height: 1;
    text-shadow: 0 4px 10px rgba(90, 25, 0, 0.25);
}

.mines-intro p {
    color: #fff7f2;
    font-size: 15px;
}

.mines-game {
    padding: 28px 20px 35px;
    text-align: center;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 176, 30, 0.12),
            transparent 45%
        ),
        #21100a;
}

.mines-information {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: min(100%, 600px);
    margin: 0 auto 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 204, 70, 0.28);
    border-radius: 16px;
}

.information-item {
    padding: 14px 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.information-item:last-child {
    border-right: 0;
}

.information-item small,
.information-item strong {
    display: block;
}

.information-item small {
    margin-bottom: 6px;
    color: #bca89d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.information-item strong {
    color: var(--v66-gold);
    font-size: 17px;
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: min(100%, 530px);
    margin: 0 auto 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.24);
    border: 2px solid rgba(255, 174, 28, 0.42);
    border-radius: 22px;
    box-shadow:
        inset 0 0 35px rgba(0, 0, 0, 0.35),
        0 15px 30px rgba(0, 0, 0, 0.2);
}

.mine-tile {
    position: relative;
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    color: white;
    font-size: 27px;
    cursor: pointer;
    background:
        linear-gradient(
            145deg,
            #71331b,
            #35140b
        );
    border: 2px solid #a85227;
    border-radius: 14px;
    box-shadow:
        inset 2px 2px 4px rgba(255, 198, 103, 0.17),
        inset -3px -4px 7px rgba(0, 0, 0, 0.3),
        0 6px 10px rgba(0, 0, 0, 0.22);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.mine-tile::before {
    content: "?";
    color: #ffc85a;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 0 9px rgba(255, 190, 50, 0.6);
}

.mine-tile:hover:not(:disabled) {
    z-index: 2;
    transform: translateY(-3px) scale(1.04);
    border-color: var(--v66-gold);
}

.mine-tile:disabled {
    cursor: not-allowed;
}

.mine-tile.revealed::before {
    display: none;
}

.mine-tile.safe {
    background:
        radial-gradient(
            circle,
            #fff8af,
            #ffb916 55%,
            #d76b00
        );
    border-color: #fff09d;
    animation: revealTile 0.35s ease;
}

.mine-tile.bomb {
    background:
        radial-gradient(
            circle,
            #ff7757,
            #d9230c 60%,
            #641107
        );
    border-color: #ff9d86;
    animation: bombShake 0.45s ease;
}

.mine-tile.hidden-result {
    opacity: 0.42;
}

@keyframes revealTile {
    0% {
        transform: rotateY(90deg) scale(0.8);
    }

    70% {
        transform: rotateY(0deg) scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes bombShake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px) rotate(-3deg);
    }

    50% {
        transform: translateX(6px) rotate(3deg);
    }

    75% {
        transform: translateX(-4px);
    }
}

.mines-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.start-button,
.cash-out-button {
    min-width: 175px;
    padding: 14px 22px;
    color: white;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
}

.start-button {
    background: linear-gradient(
        135deg,
        var(--v66-orange),
        var(--v66-orange-dark)
    );
    box-shadow: 0 9px 18px rgba(255, 75, 11, 0.3);
}

.cash-out-button {
    color: #572900;
    background: linear-gradient(
        135deg,
        #fff08b,
        var(--v66-gold)
    );
    box-shadow: 0 9px 18px rgba(255, 198, 45, 0.2);
}

.start-button:disabled,
.cash-out-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.mines-status {
    min-height: 20px;
    margin-top: 15px;
    color: #c8b4a9;
    font-size: 13px;
}

.mines-rules {
    padding: 30px 22px;
    text-align: center;
}

.mines-rules h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 760px;
    margin: 0 auto;
}

.rules-grid div {
    padding: 18px 14px;
    background: #fff8f3;
    border: 1px solid #ffe0cf;
    border-radius: 15px;
}

.rules-grid span {
    display: grid;
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;
    place-items: center;
    color: white;
    font-size: 13px;
    font-weight: 900;
    background: var(--v66-orange);
    border-radius: 50%;
}

.rules-grid p {
    color: #777777;
    font-size: 12px;
    line-height: 1.5;
}

.mines-footer {
    padding: 18px;
    color: #888888;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
    border-top: 1px solid var(--v66-border);
}

.result-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(20, 8, 3, 0.76);
    backdrop-filter: blur(6px);
}

.result-modal.show {
    display: grid;
}

.result-card {
    width: min(100%, 390px);
    padding: 32px 25px;
    text-align: center;
    background: white;
    border: 3px solid var(--v66-gold);
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.result-symbol {
    display: grid;
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    place-items: center;
    font-size: 40px;
    background: linear-gradient(
        135deg,
        #fff4a1,
        var(--v66-gold)
    );
    border: 5px solid #ff9e17;
    border-radius: 50%;
}

.result-label {
    color: var(--v66-orange);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 3px;
}

.result-card h2 {
    margin: 10px 0;
    font-size: 27px;
}

.reward-amount {
    margin: 16px 0;
    color: var(--v66-orange-dark);
    font-size: 43px;
    font-weight: 900;
}

.result-card > p:last-of-type {
    color: #777777;
    font-size: 13px;
}

#minesCloseResultButton {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    color: white;
    font-weight: 900;
    cursor: pointer;
    background: var(--v66-orange);
    border: 0;
    border-radius: 999px;
}

@media (max-width: 700px) {
    body {
        padding: 0;
    }

    .mines-container {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .mines-header {
        padding: 14px 12px;
    }

    .brand small {
        display: none;
    }

    .mines-grid {
        gap: 6px;
        padding: 10px;
    }

    .mine-tile {
        font-size: 21px;
        border-radius: 10px;
    }

    .mines-actions {
        flex-direction: column;
        align-items: center;
    }

    .start-button,
    .cash-out-button {
        width: min(100%, 340px);
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }
}