/* ============================================================
   PLINKO — стиль как у Mines/Wheel
   ============================================================ */

.screen#plinko-screen {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-bottom: 10px;
}

#plinko-screen #plinko-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 4px;
}

#plinko-screen #plinko-header h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.5px;
    font-style: normal;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 40%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CANVAS ===== */

#plinko-screen #plinko-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 700 / 820;
    margin: 0 auto;
    border-radius: 20px;
    background: rgba(3, 4, 8, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.20);
    padding: 8px;
    box-sizing: border-box;
    box-shadow: 0 14px 40px rgba(0,0,0,0.85), inset 0 1px 1.5px rgba(255,255,255,0.15);
    flex-shrink: 0;
    overflow: hidden;
}

#plinko-screen #plinko-canvas {
    position: absolute;
    top: 8px;
    left: 8px;
    width: calc(100% - 16px) !important;
    height: calc(100% - 16px) !important;
    display: block;
    border-radius: 14px;
}

/* ===== PANEL ===== */

#plinko-screen #plinko-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

#plinko-screen #pbet-display {
    text-align: center;
    padding: 6px 0;
    background: linear-gradient(155deg, #0e111a 0%, #030408 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.7);
}

#plinko-screen #pbet-main {
    font-size: 38px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding: 6px 0 2px;
    background: linear-gradient(135deg, #ffffff 0%, #6a9fd8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#plinko-screen #pbet-sub {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
    padding-bottom: 8px;
    min-height: 16px;
}

#plinko-screen #pbet-sub.ok {
    color: #7d8b99;
}

/* ===== CHIPS ===== */

#plinko-screen .chips-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

#plinko-screen .chips-row.small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#plinko-screen .chip {
    background: #08080f;
    border: 1px solid rgba(102,126,234,0.16);
    border-radius: 11px;
    color: #e8e8ec;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 13.5px;
    padding: 11px 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-variant-numeric: tabular-nums;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    box-sizing: border-box;
}

#plinko-screen .chip:active {
    border-color: #667eea;
}

#plinko-screen .chip.active {
    background: linear-gradient(135deg, #667eea, #5b4fdb);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 5px 16px rgba(102,126,234,0.5);
}

#plinko-screen .chip.small {
    font-size: 13px;
    padding: 9px 4px;
}

/* ===== PLAY BUTTON ===== */

#plinko-screen .btn-primary {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #5b4fdb);
    color: #fff;
    border: none;
    border-radius: 13px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0.8px;
    box-shadow: 0 8px 24px rgba(102,126,234,0.5);
    transition: all 0.2s;
    margin-top: 2px;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

#plinko-screen .btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

#plinko-screen .btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

#plinko-screen .btn-primary.spinning {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    box-shadow: none;
    cursor: wait;
}

/* ===== РЕЗУЛЬТАТ ===== */

#plinko-screen .result-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    font-size: 52px;
    font-weight: 900;
    letter-spacing: 3px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 14px 28px;
    border-radius: 22px;
    background: rgba(5, 8, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 3px solid currentColor;
    box-shadow: 0 0 40px currentColor, 0 8px 30px rgba(0, 0, 0, 0.8);
}

#plinko-screen .result-banner.show {
    animation: plinkoBannerPop 1.6s ease-out forwards;
}

#plinko-screen .result-banner.win {
    color: #4dcd5e;
    text-shadow: 0 0 30px rgba(77,205,94,0.9);
}

#plinko-screen .result-banner.lose {
    color: #e74c3c;
    text-shadow: 0 0 30px rgba(231,76,60,0.9);
}

@keyframes plinkoBannerPop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
    40%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}