/* Plinko Game Styles */

/* Overlay */
.plinko-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.plinko-game {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 20px;
    max-width: 440px;
    width: 95%;
    box-shadow: 
        0 0 40px rgba(255, 107, 107, 0.3),
        0 0 80px rgba(255, 107, 107, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid #3a3a5a;
    position: relative;
    overflow: hidden;
}

/* Header */
.plinko-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a3a5a;
}

.plinko-title {
    font-size: 1.4em;
    margin: 0;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #ff6b6b);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.plinko-karma-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #4a4a6a;
}

.plinko-karma-display .karma-icon {
    font-size: 1.3em;
}

.plinko-karma-display .karma-amount {
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.plinko-karma-display .karma-delta {
    position: absolute;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0;
    transform: translateY(0);
    transition: all 0.5s ease;
    right: -40px;
}

.plinko-karma-display .karma-delta.show {
    opacity: 1;
    transform: translateY(-20px);
}

.plinko-karma-display .karma-delta.positive {
    color: #4ade80;
}

.plinko-karma-display .karma-delta.negative {
    color: #ff6b6b;
}

/* Board Container */
.plinko-board-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#plinko-canvas {
    border-radius: 12px;
    border: 2px solid #3a3a5a;
    background: #1a1a2e;
}

/* Drop Zone */
.drop-zone {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.drop-btn {
    width: 40px;
    height: 30px;
    background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
    border: 1px solid #5a5a7a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-btn:hover:not(.disabled) {
    background: linear-gradient(180deg, #5a5a7a 0%, #4a4a6a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.drop-btn:active:not(.disabled) {
    transform: translateY(0);
}

.drop-btn.center {
    width: 50px;
    background: linear-gradient(180deg, #ff6b6b 0%, #ee5a5a 100%);
    border-color: #ff8080;
}

.drop-btn.center:hover:not(.disabled) {
    background: linear-gradient(180deg, #ff8080 0%, #ff6b6b 100%);
}

.drop-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Result Display */
.plinko-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.plinko-result.show {
    opacity: 1;
}

.result-content {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid var(--mult-color, #fff);
    border-radius: 20px;
    padding: 20px 40px;
    text-align: center;
    box-shadow: 
        0 0 30px var(--mult-color, #fff),
        0 0 60px rgba(0, 0, 0, 0.8);
    animation: resultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-emoji {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.result-mult {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--mult-color, #fff);
    text-shadow: 0 0 20px var(--mult-color, #fff);
}

.result-message {
    font-size: 1.2em;
    color: #ccc;
    margin: 5px 0;
}

.result-payout {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 10px;
}

.result-content.legendary .result-payout {
    color: #fbbf24;
    animation: pulse 0.5s ease infinite;
}

.result-content.lose .result-payout {
    color: #ff4444;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Info Section */
.plinko-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 15px 0;
    font-size: 0.9em;
    color: #888;
}

.cost-value, .base-value {
    color: #fbbf24;
    font-weight: bold;
}

/* Footer */
.plinko-footer {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.plinko-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(180deg, #ff6b6b 0%, #ee5a5a 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.plinko-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.plinko-btn:active:not(.disabled) {
    transform: translateY(0);
}

.plinko-btn.secondary {
    background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
    box-shadow: none;
}

.plinko-btn.secondary:hover:not(.disabled) {
    background: linear-gradient(180deg, #5a5a7a 0%, #4a4a6a 100%);
}

.plinko-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Particle container */
#plinko-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
}

/* Screen shake */
.plinko-game.mega-shake {
    animation: megaShake 0.5s ease;
}

@keyframes megaShake {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    10% { transform: translate(-8px, -5px) rotate(-1deg); }
    20% { transform: translate(8px, 5px) rotate(1deg); }
    30% { transform: translate(-6px, 3px) rotate(-0.5deg); }
    40% { transform: translate(6px, -3px) rotate(0.5deg); }
    50% { transform: translate(-4px, 2px) rotate(-0.3deg); }
    60% { transform: translate(4px, -2px) rotate(0.3deg); }
    70% { transform: translate(-2px, 1px) rotate(-0.1deg); }
    80% { transform: translate(2px, -1px) rotate(0.1deg); }
    90% { transform: translate(-1px, 0) rotate(0); }
}

/* Responsive */
@media (max-width: 480px) {
    .plinko-game {
        padding: 15px;
        border-radius: 15px;
    }
    
    .plinko-title {
        font-size: 1.2em;
    }
    
    #plinko-canvas {
        width: 100%;
        height: auto;
    }
    
    .result-content {
        padding: 15px 25px;
    }
    
    .result-mult {
        font-size: 2em;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
