@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap");

.plinko-page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.plinko-main-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: #1a2f3e;
    border: 1px solid #2e4f61;
    border-radius: 10px;
    overflow: hidden;
    min-height: 620px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.plinko-controls {
    background: #243f4f;
    border-right: 1px solid #2d5367;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plinko-mode-toggle {
    background: #102837;
    border: 1px solid #2f4e61;
    border-radius: 999px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.plinko-mode-toggle .mode-btn {
    border: none;
    border-radius: 999px;
    min-height: 38px;
    background: transparent;
    color: #c8dce8;
    font: 600 14px "Space Grotesk", sans-serif;
    cursor: pointer;
}

.plinko-mode-toggle .mode-btn.active {
    background: #44687d;
    color: #f4fbff;
}

.plinko-mode-toggle .mode-btn[disabled] {
    opacity: 0.75;
    cursor: not-allowed;
}

.plinko-controls .control-group label {
    color: #d5e7f2;
    font: 600 14px "Space Grotesk", sans-serif;
    margin-bottom: 6px;
    display: block;
}

.plinko-input-row,
.plinko-select-wrap select {
    min-height: 44px;
    border: 1px solid #496b7f;
    border-radius: 8px;
    background: #143041;
    color: #f2f9ff;
    font: 700 18px "Space Grotesk", sans-serif;
}

.plinko-input-row {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.plinko-input-row input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #f2f9ff;
    font: 700 18px "Space Grotesk", sans-serif;
    padding: 9px 10px;
}

#plinkoBetAmount {
    -moz-appearance: textfield;
    appearance: textfield;
}

#plinkoBetAmount::-webkit-outer-spin-button,
#plinkoBetAmount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.plinko-currency {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #83eb00;
    color: #0e2217;
    font: 800 14px "Space Grotesk", sans-serif;
}

.plinko-modifiers {
    display: flex;
    align-items: center;
    border-left: 1px solid #3f6073;
    margin-left: 6px;
}

.plinko-mod-btn {
    min-width: 48px;
    min-height: 44px;
    border: none;
    background: transparent;
    color: #b9d0dd;
    font: 600 15px "Space Grotesk", sans-serif;
    cursor: pointer;
}

.plinko-mod-btn + .plinko-mod-btn {
    border-left: 1px solid #3f6073;
}

.plinko-select-wrap select {
    width: 100%;
    padding: 0 12px;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #d3e3ee 50%), linear-gradient(135deg, #d3e3ee 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.plinko-play-btn {
    min-height: 44px;
    border: 1px solid #64aaef;
    border-radius: 9px;
    background: linear-gradient(180deg, #2f90ec 0%, #2a7bd3 100%);
    color: #eff7fc;
    font: 600 22px "Space Grotesk", sans-serif;
    cursor: pointer;
}

.plinko-play-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.plinko-board-area {
    background: radial-gradient(140% 90% at 50% 10%, #123750 0%, #0c2b3f 55%, #0a2435 100%);
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plinko-stage {
    position: relative;
    min-height: 500px;
}

.plinko-pegs {
    position: absolute;
    inset: 0;
}

.plinko-peg {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f2f7fb;
    box-shadow: 0 0 0 2px rgba(21, 48, 66, 0.65);
    transform: translate(-50%, -50%);
}

.plinko-ball {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffcb4d;
    box-shadow: 0 0 10px rgba(255, 213, 89, 0.9);
    transform: translate(-50%, -50%);
    opacity: 0;
}

.plinko-ball.active {
    opacity: 1;
}

.plinko-bins {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.plinko-hover-info {
    min-height: 86px;
    border: 1px solid #3c6174;
    border-radius: 10px;
    background: #1f3c4d;
    margin: 8px auto 8px;
    width: min(640px, 92%);
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    pointer-events: none;
    position: relative;
    visibility: hidden;
    max-height: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-color: transparent;
    overflow: hidden;
}

.plinko-hover-info.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    max-height: 120px;
    min-height: 86px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: 8px;
    margin-bottom: 8px;
    border-color: #3c6174;
}

.plinko-hover-info::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    background: transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

.plinko-hover-info.active::after {
    background: #1f3c4d;
    border-right-color: #3c6174;
    border-bottom-color: #3c6174;
}

.hover-field label {
    display: block;
    color: #d0e2ee;
    font: 600 13px "Space Grotesk", sans-serif;
    margin-bottom: 6px;
}

.hover-value-row {
    min-height: 40px;
    border: 1px solid #4b7084;
    border-radius: 8px;
    background: #244456;
    color: #f0f8ff;
    font: 700 28px "Space Grotesk", sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.hover-suffix {
    color: #d4e5f0;
    font: 700 24px "Space Grotesk", sans-serif;
}

.plinko-bin {
    min-height: 30px;
    border-radius: 6px;
    border: 1px solid #7fc3e6;
    background: #3ea8dd;
    color: #032133;
    font: 700 14px "Space Grotesk", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plinko-bin.mid {
    background: #2390e3;
    color: #ebf8ff;
}

.plinko-bin.edge {
    background: #8dd6dd;
}

.plinko-bin.hit {
    outline: 2px solid #ffffff;
    filter: brightness(1.08);
}

@media (max-width: 980px) {
    .plinko-main-container {
        grid-template-columns: 1fr;
    }

    .plinko-controls {
        border-right: none;
        border-bottom: 1px solid #35596b;
    }

    .plinko-stage {
        min-height: 430px;
    }
}
