:root {
    --v66-orange: #ff4b0b;
    --v66-orange-dark: #e73700;
    --v66-orange-light: #fff0e9;
    --v66-gold: #ffcc45;
    --v66-brown: #2c170f;
    --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);
}

.plinko-container {
    width: 100%;
    max-width: 1100px;
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    overflow: hidden;
    background: var(--v66-card);
    border: 1px solid var(--v66-border);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(60, 30, 15, 0.14);
}

.plinko-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: 15px;
    letter-spacing: 2px;
}

.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: var(--v66-orange-light);
    border: 1px solid rgba(255, 75, 11, 0.3);
    border-radius: 999px;
}

.plinko-intro {
    padding: 30px 20px;
    color: white;
    text-align: center;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 221, 102, 0.26),
            transparent 45%
        ),
        linear-gradient(
            135deg,
            var(--v66-orange),
            #ff7200
        );
}

.plinko-intro span {
    color: #fff1b7;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 4px;
}

.plinko-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);
}

.plinko-intro p {
    color: #fff7f2;
    font-size: 15px;
}

.plinko-game {
    padding: 26px 20px 32px;
    text-align: center;
    background: #f8f8f8;
}

.drop-controls p {
    margin-bottom: 12px;
    color: #777777;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drop-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.drop-position {
    padding: 10px 20px;
    color: #777777;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    background: white;
    border: 1px solid #dddddd;
    border-radius: 999px;
    transition: 0.2s ease;
}

.drop-position:hover,
.drop-position.active {
    color: white;
    background: var(--v66-orange);
    border-color: var(--v66-orange);
    box-shadow: 0 7px 15px rgba(255, 75, 11, 0.23);
}

.plinko-board {
    position: relative;
    width: min(100%, 700px);
    margin: 0 auto 22px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at top,
            rgba(255, 195, 62, 0.18),
            transparent 40%
        ),
        linear-gradient(
            180deg,
            #32160d,
            #160906
        );
    border: 5px solid #ff9c20;
    border-radius: 28px;
    box-shadow:
        inset 0 0 45px rgba(255, 140, 20, 0.17),
        0 18px 35px rgba(55, 25, 10, 0.18);
}

#plinkoCanvas {
    display: block;
    width: 100%;
    height: auto;
}

.reward-slots {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.reward-slots div {
    position: relative;
    z-index: 5;

    display: grid;
    min-height: 62px;
    place-items: end center;
    padding: 0 3px 8px;

    color: #4b210d;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;

    /*
       上方18px透明，让球可以被看到掉进格子；
       下方是奖品格的前面板，会遮住进入后的球。
    */
    background: linear-gradient(
        180deg,
        transparent 0,
        transparent 18px,
        #ffe47a 18px,
        #f2ad25 38px,
        #d9780a 100%
    );

    border-right: 2px solid #ffc944;
    border-bottom: 3px solid #e8870c;
    border-left: 2px solid #ffc944;
    border-radius: 0 0 13px 13px;

    box-shadow:
        inset 0 -7px 9px rgba(105, 40, 0, 0.2),
        0 5px 10px rgba(55, 20, 0, 0.3);
}

/* 奖品格的上方入口边缘 */
.reward-slots div::before {
    content: "";
    position: absolute;
    z-index: 6;
    top: 15px;
    right: -2px;
    left: -2px;
    height: 6px;

    background: linear-gradient(
        180deg,
        #fff1a0,
        #e99112
    );

    border: 1px solid #ffd55c;
    border-radius: 999px;
}

/* 不使用篮子编织效果 */
.reward-slots div::after {
    display: none;
}

/* 篮口 */
.reward-slots div::before {
    content: "";
    position: absolute;
    z-index: 7;
    top: 7px;
    right: 0;
    left: 0;
    height: 9px;

    background: linear-gradient(
        180deg,
        #fff2a5,
        #e68e12
    );

    border: 2px solid #ffd35a;
    border-radius: 999px;
}

/* 篮子编织横线 */
.reward-slots div::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 12px;
    left: 8px;
    height: 2px;

    background: rgba(115, 48, 0, 0.25);
    box-shadow:
        0 -9px 0 rgba(115, 48, 0, 0.22),
        0 -18px 0 rgba(115, 48, 0, 0.18);
}

/* 篮子的顶部边缘 */
.reward-slots div::before {
    content: "";
    position: absolute;
    top: -8px;
    right: -3px;
    left: -3px;
    height: 8px;

    background: linear-gradient(
        180deg,
        #fff0a2,
        #e99613
    );

    border: 2px solid #ffcf4d;
    border-radius: 999px;
}

/* 篮子的横向编织纹理 */
.reward-slots div::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 13px;
    left: 4px;
    height: 2px;

    background: rgba(130, 60, 0, 0.25);
    box-shadow:
        0 7px 0 rgba(130, 60, 0, 0.22),
        0 14px 0 rgba(130, 60, 0, 0.18);
}

.drop-coin-button {
    padding: 15px 32px;
    color: white;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    background: linear-gradient(
        135deg,
        var(--v66-orange),
        var(--v66-orange-dark)
    );
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(255, 75, 11, 0.28);
}

.drop-coin-button:hover {
    transform: translateY(-2px);
}

.drop-coin-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.plinko-status {
    min-height: 20px;
    margin-top: 14px;
    color: #777777;
    font-size: 13px;
}

.plinko-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.72);
    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-coin {
    display: grid;
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    place-items: center;
    color: #9a4800;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(
        135deg,
        #fff4a1,
        var(--v66-gold)
    );
    border: 6px solid #ff9e17;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(255, 154, 20, 0.3);
}

.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;
}

#plinkoCloseResultButton {
    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;
    }

    .plinko-container {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .plinko-header {
        padding: 14px 12px;
    }

    .brand small {
        display: none;
    }

    .drop-position {
        padding: 9px 14px;
    }

    .reward-slots {
        gap: 2px;
    }

    .reward-slots div {
        min-height: 45px;
        font-size: 8px;
        border-width: 1px;
    }
}