/* ==================== CUPS GAME ==================== */

#screenCups {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 12px 80px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    background: #08090d;
    min-height: 100vh;
    min-height: 100dvh;
}

#screenCups.active { display: flex !important; }

.cups-game-container {
    width: 100%;
    max-width: 426px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
    gap: 20px;
}

/* ==================== СЦЕНА СТАКАНЧИКОВ ==================== */

.cups-scene {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 20px 0;
    position: relative;
}

.cups-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.cup-wrapper {
    position: relative;
    cursor: default;
    transition: transform 0.2s ease;
}

.cup-wrapper.selectable { cursor: pointer; }
.cup-wrapper.selectable:active { transform: scale(1.05); }

.cup {
    position: relative;
    width: 100px;
    height: 100px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cup-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.cup-ball {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    z-index: -1;
    animation: ball-appear 0.3s ease-out;
}

.cup-ball img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes ball-appear {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==================== ОВЕРЛЕЙ РЕЗУЛЬТАТА ==================== */

.cups-result-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 24px 32px;
    z-index: 10;
    border: 2px solid rgba(255,215,0,0.3);
    animation: result-fade-in 0.3s ease;
    white-space: nowrap;
}

.cups-result-text {
    color: #FFD700;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.3);
    animation: result-pop 0.4s ease-out;
}

@keyframes result-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes result-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==================== БЛОК СТАВОК ==================== */

.cups-bet-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cups-bet-input-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cups-bet-minus,
.cups-bet-plus {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #a0b4e0;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.cups-bet-minus:active,
.cups-bet-plus:active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    border-color: rgba(255, 255, 255, 0.2);
}

.cups-bet-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    min-width: 0;
}

.cups-bet-input::placeholder { color: rgba(255, 255, 255, 0.3); font-size: 13px; }

.cups-currency-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cups-currency-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    color: #6b7daa;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.cups-currency-btn img { width: 18px; height: 18px; object-fit: contain; pointer-events: none; }

.cups-currency-btn.active {
    border-color: #f5c842;
    color: #ffd700;
    background: rgba(245, 200, 66, 0.1);
}

.cups-dice-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.5s ease;
    -webkit-tap-highlight-color: transparent;
}

.cups-dice-icon:active { transform: scale(0.95); }
.cups-dice-icon img { width: 28px; height: 28px; object-fit: contain; pointer-events: none; }

.cups-play-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.cups-play-btn:active { transform: scale(0.98); box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
.cups-play-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }