#plant-slot-overlay {
    position: fixed;
    inset: 0;
    z-index: 72;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(24, 42, 28, 0.38);
    backdrop-filter: blur(2px);
}

#plant-slot-overlay.open {
    display: flex;
}

#plant-slot-panel {
    width: min(850px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
    overflow: auto;
    border: 3px solid #ffdf72;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 245, 0.97), rgba(230, 248, 223, 0.97)),
        radial-gradient(circle at 16% 8%, rgba(255, 224, 116, 0.42), transparent 38%);
    box-shadow: 0 26px 72px rgba(20, 36, 20, 0.38), inset 0 0 0 2px rgba(83, 129, 69, 0.2);
    color: #17381f;
    animation: plantSlotPanelIn 220ms ease-out;
}

.plant-slot-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 14px;
    border-bottom: 2px solid rgba(72, 115, 60, 0.24);
    background: linear-gradient(90deg, #fff3bb, #d8f6c9 56%, #c8eef1);
}

.plant-slot-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0;
    color: #163b22;
}

.plant-slot-subtitle {
    margin-top: 4px;
    color: #4c6b46;
    font-weight: 750;
    font-size: 13px;
}

.plant-slot-close {
    border: 0;
    border-radius: 6px;
    padding: 9px 13px;
    background: #17381f;
    color: #fff6d6;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 3px 0 #071b0d;
}

.plant-slot-body {
    display: grid;
    grid-template-columns: minmax(250px, 0.82fr) minmax(360px, 1.35fr);
    gap: 16px;
    padding: 18px;
}

.plant-slot-odds {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.plant-slot-odd-card {
    min-height: 68px;
    border: 2px solid rgba(46, 89, 46, 0.28);
    border-radius: 8px;
    padding: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 248, 229, 0.82));
    box-shadow: inset 0 -8px 16px rgba(63, 116, 55, 0.08);
}

.plant-slot-odd-card.gold {
    border-color: #f1b52f;
    background: linear-gradient(180deg, #fff4bf, #ffe08a);
}

.plant-slot-odd-percent {
    display: block;
    font-size: 22px;
    font-weight: 950;
    color: #1f4b2b;
}

.plant-slot-odd-name {
    display: block;
    margin-top: 2px;
    font-weight: 900;
    font-size: 12px;
    color: #244426;
}

.plant-slot-odd-desc {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.15;
    color: #5a6a44;
}

.plant-slot-seeds,
.plant-slot-machine-face {
    border: 2px solid rgba(48, 93, 44, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.plant-slot-seeds {
    min-height: 285px;
}

.plant-slot-section-title {
    padding: 11px 12px 8px;
    font-size: 13px;
    font-weight: 950;
    color: #204321;
    text-transform: uppercase;
}

#plant-slot-seed-list {
    display: grid;
    gap: 9px;
    padding: 0 10px 12px;
}

.plant-slot-seed {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border: 2px solid rgba(41, 92, 52, 0.24);
    border-radius: 8px;
    padding: 8px;
    background: linear-gradient(180deg, #ffffff, #eef8ea);
    color: #17381f;
    cursor: pointer;
    text-align: left;
    transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.plant-slot-seed:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgba(231, 169, 34, 0.72);
    box-shadow: 0 7px 16px rgba(28, 65, 31, 0.12);
}

.plant-slot-seed.selected {
    border-color: #e7a922;
    background: linear-gradient(180deg, #fff8cf, #f0f9d4);
    box-shadow: 0 0 0 3px rgba(238, 181, 49, 0.18);
}

.plant-slot-seed:disabled {
    cursor: default;
    opacity: 0.48;
}

.plant-slot-empty {
    display: block;
    color: #5b6a4c;
    font-weight: 850;
}

.plant-slot-seed-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.plant-slot-seed-name {
    display: block;
    font-weight: 950;
}

.plant-slot-seed-meta {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #617055;
    font-weight: 750;
}

.plant-slot-seed-count {
    min-width: 38px;
    text-align: center;
    border-radius: 999px;
    padding: 5px 8px;
    background: #1f4b2b;
    color: white;
    font-weight: 950;
}

.plant-slot-machine-face {
    position: relative;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(56, 107, 65, 0.98), rgba(30, 62, 42, 0.98)),
        radial-gradient(circle at 24% 8%, rgba(255, 213, 85, 0.35), transparent 42%),
        radial-gradient(circle at 78% 22%, rgba(122, 233, 255, 0.2), transparent 38%);
    color: #fff8d6;
    overflow: hidden;
}

.plant-slot-machine-face::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px dashed rgba(255, 234, 146, 0.34);
    border-radius: 8px;
    pointer-events: none;
}

.plant-slot-track {
    position: relative;
    z-index: 1;
    height: 156px;
    padding: 12px;
    border: 3px solid #f4c64d;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff7cf, #f6dfa0);
    box-shadow: inset 0 12px 24px rgba(72, 51, 13, 0.18), 0 7px 0 #15331f;
    overflow: hidden;
}

.plant-slot-track-strip {
    height: 100%;
    display: flex;
    border-radius: 7px;
    border: 2px solid rgba(21, 58, 30, 0.28);
    overflow: hidden;
    background: #f4ffe9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.plant-slot-segment {
    position: relative;
    min-width: 44px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    color: #174022;
    text-align: center;
    border-right: 2px solid rgba(23, 64, 34, 0.14);
    box-shadow: inset 0 -18px 28px rgba(38, 93, 62, 0.1);
}

.plant-slot-segment.lose {
    background: linear-gradient(180deg, #edf1e9, #cfd9cb);
}

.plant-slot-segment.refund {
    background: linear-gradient(180deg, #efffe7, #bceea6);
}

.plant-slot-segment.fast2 {
    background: linear-gradient(180deg, #e9ffff, #aeeefa);
}

.plant-slot-segment.fast4 {
    background: linear-gradient(180deg, #f1e8ff, #c8a7ff);
}

.plant-slot-segment.gold {
    background: linear-gradient(180deg, #fff6b7, #ffd24a);
}

.plant-slot-segment-name {
    font-size: 13px;
    font-weight: 1000;
}

.plant-slot-segment-chance {
    font-size: 20px;
    font-weight: 1000;
}

.plant-slot-pointer {
    position: absolute;
    top: 6px;
    bottom: 4px;
    left: 8%;
    z-index: 3;
    width: 5px;
    border-radius: 999px;
    background: #ff3150;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.86), 0 0 20px rgba(255, 61, 87, 0.72);
    transform: translateX(-50%);
}

.plant-slot-pointer::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    background: #ff3d57;
    transform: translate(-50%, -52%) rotate(-45deg);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.86);
}

.plant-slot-track.spinning .plant-slot-pointer {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.86), 0 0 30px rgba(255, 213, 63, 0.78);
}

.plant-slot-reel {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.plant-slot-reel span {
    border: 2px solid rgba(255, 234, 146, 0.42);
    border-radius: 999px;
    padding: 5px 14px;
    background: rgba(255, 249, 222, 0.16);
    color: #fff8d6;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0;
}

#plant-slot-overlay.spinning .plant-slot-reel span {
    animation: plantSlotStatusPulse 360ms ease-in-out infinite;
}

.plant-slot-lever-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

#plant-slot-status {
    min-height: 28px;
    flex: 1;
    font-weight: 900;
    color: #fff0a8;
    line-height: 1.2;
}

#plant-slot-status.success {
    color: #b9ffb7;
}

#plant-slot-status.error {
    color: #ffd1d1;
}

#plant-slot-spin {
    min-width: 156px;
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffd44c, #f29b25);
    color: #422507;
    font-size: 18px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 7px 0 #7c3e0e, 0 0 22px rgba(255, 203, 73, 0.3);
}

#plant-slot-spin:disabled {
    cursor: default;
    filter: grayscale(0.8);
    opacity: 0.65;
    box-shadow: 0 4px 0 #7c3e0e;
}

#plant-slot-overlay.spinning #plant-slot-spin {
    animation: plantSlotButtonPulse 360ms ease-in-out infinite;
}

#plant-slot-burst-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 90;
}

.plant-slot-result-burst {
    position: absolute;
    left: 50%;
    top: 14%;
    transform: translate(-50%, -40px) scale(0.92);
    min-width: min(520px, calc(100vw - 32px));
    border: 3px solid #fff3b4;
    border-radius: 8px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #f7fff3, #d9f6cf);
    color: #17381f;
    text-align: center;
    box-shadow: 0 22px 70px rgba(10, 34, 20, 0.35);
    opacity: 0;
    animation: plantSlotBurstIn 1.8s ease forwards;
}

.plant-slot-result-burst.gold {
    border-color: #ffe88e;
    background: linear-gradient(180deg, #fff8be, #ffcf3d);
    color: #3b2500;
}

.plant-slot-result-title {
    font-size: 14px;
    font-weight: 950;
    color: #4e653a;
    text-transform: uppercase;
}

.plant-slot-result-name {
    margin-top: 5px;
    font-size: 30px;
    font-weight: 1000;
}

.plant-slot-result-meta {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 850;
}

.plant-slot-particle {
    position: fixed;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ffd447;
    pointer-events: none;
    z-index: 91;
    animation: plantSlotParticleFly 850ms ease-out forwards;
}

@media (max-width: 760px) {
    #plant-slot-panel {
        max-height: calc(100vh - 18px);
    }

    .plant-slot-body {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .plant-slot-odds {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plant-slot-track {
        height: 124px;
    }

    .plant-slot-segment-name {
        font-size: 11px;
    }

    .plant-slot-segment-chance {
        font-size: 16px;
    }

}

@keyframes plantSlotPanelIn {
    from { transform: translateY(16px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes plantSlotStatusPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

@keyframes plantSlotButtonPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

@keyframes plantSlotBurstIn {
    0% { transform: translate(-50%, -44px) scale(0.88); opacity: 0; }
    14% { transform: translate(-50%, 0) scale(1.04); opacity: 1; }
    74% { transform: translate(-50%, 0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -28px) scale(0.95); opacity: 0; }
}

@keyframes plantSlotParticleFly {
    from { transform: translate(0, 0) scale(1); opacity: 1; }
    to { transform: translate(var(--slot-px), var(--slot-py)) scale(0.2); opacity: 0; }
}
