* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(180deg, #1a2332 0%, #0d1420 100%);
    color: white;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Top Stats Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
}

/* Plinko Logo */
.plinko-logo {
    width: 80px;
    height: auto;
    border-radius: 10px;
    flex-shrink: 0;
    margin: auto;
}

.stat-box {
    background: linear-gradient(145deg, #2a3544 0%, #1e2633 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 15px 30px;
    flex: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 18px;
    font-weight: bold;
    color: #a0aec0;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 24px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Live Stats Panel */
.live-stats {
    background: linear-gradient(145deg, #2d3a4f 0%, #1f2937 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 15px 25px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.live-stats-title {
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.live-stats-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.live-stat {
    flex: 1;
    text-align: center;
}

.live-stat-label {
    font-size: 14px;
    font-weight: bold;
    color: #a0aec0;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.live-stat-value {
    font-size: 22px;
    font-weight: 900;
    color: white;
}

.progress-container {
    flex: 1;
    text-align: center;
}

.progress-label {
    font-size: 14px;
    font-weight: bold;
    color: #a0aec0;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: #1a2332;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #3d4a5c;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.progress-dot {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
}

/* Main Game Container */
.game-container {
    display: flex;
    gap: 20px;
    width: 100%;
    /* max-width: 1200px; */
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Plinko Board */
.plinko-board {
    background: linear-gradient(145deg, #2a3544 0%, #1e2633 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 30px;
    flex: 0 0 auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plinko-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.canvas-wrapper {
    position: relative;
}

#unity-canvas {
    width: 440px;
    height: 440px;
    border-radius: 20px;
    display: block;
}

.token-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    pointer-events: none;   /* so Unity clicks still work */
}


/* Multipliers Panel */
.multipliers-panel {
    background: linear-gradient(145deg, #2a3544 0%, #1e2633 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 20px;
    flex: 0 0 auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.multipliers-title {
    font-size: 16px;
    font-weight: 700;
    color: #a0aec0;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}
        
.multiplier-slot {
    background: linear-gradient(145deg, #1e2633 0%, #151d28 100%);
    border: 3px solid #3d4a5c;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.multiplier-slot:hover {
    background: linear-gradient(145deg, #252f3d 0%, #1a2230 100%);
    border-color: #4a5c6f;
}

.multiplier-slot.selected {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%);
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.multiplier-slot.selected .multiplier-icon {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 100%);
    border-color: #93c5fd;
    color: white;
}

.multiplier-slot.selected .multiplier-value {
    color: white;
}

.multiplier-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
    border: 3px solid #5a6c7d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.multiplier-value {
    font-size: 32px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.token-display {
    background: linear-gradient(145deg, #2a3544 0%, #1e2633 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.coin-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    border: 3px solid #f97316;
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.4);
}

.token-count {
    font-size: 36px;
    font-weight: 900;
}

.game-button {
    background: linear-gradient(145deg, #4ade80 0%, #22c55e 100%);
    border: none;
    border-radius: 15px;
    padding: 20px 50px;
    font-size: 28px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
    letter-spacing: 2px;
    width: 100%
}

.game-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(34, 197, 94, 0.5);
}

.game-button:active:not(:disabled) {
    transform: translateY(0);
}

.game-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-button.auto {
    background: linear-gradient(145deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 8px 20px rgba(75, 85, 99, 0.4);
}

.game-button.max {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* Claim Section */
.claim-section {
    width: 100%;
    max-width: 800px;
    background: linear-gradient(145deg, #2a3544 0%, #1e2633 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.unclaim-amount {
    text-align: center;
    margin-bottom: 20px;
}

.unclaim-label {
    font-size: 18px;
    color: #a0aec0;
    margin-bottom: 8px;
}

.unclaim-value {
    font-size: 32px;
    font-weight: 900;
    color: #fbbf24;
}

.claim-button {
    width: 100%;
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 15px;
    padding: 20px;
    font-size: 28px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.claim-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.5);
}

/* Rules */
.rules {
    width: 100%;
    max-width: 800px;
    background: linear-gradient(145deg, #2a3544 0%, #1e2633 100%);
    border: 3px solid #3d4a5c;
    border-radius: 20px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.rules h2 {
    font-size: 28px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.rules ul {
    list-style: none;
    padding: 0;
}

.rules li {
    padding: 10px 0;
    border-bottom: 1px solid #3d4a5c;
    color: #cbd5e1;
    line-height: 1.6;
}

.rules li:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .top-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .plinko-logo {
        order: -1;
        width: 60px;
    }

    .stat-box {
        flex: 1;
        min-width: 140px;
    }

    .stat-value .token{
        display: none;
    }

    .game-container {
        flex-direction: column;
    }

    .multipliers-panel {
        width: 100%;
        order: 2;
        flex-direction: row;
        gap: 8px;
        padding: 15px 20px;
        margin-bottom: 0;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .plinko-board {
        order: 1;
        margin-bottom: 15px;
        width: 100%;
        padding: 20px 15px;
    }

    .plinko-title {
        font-size: 36px;
    }

    #unity-canvas {
        max-width: 100%;
        height: auto;
        width: 100% !important;
    }

    .multipliers-title {
        display: none;
    }

    .multiplier-slot {
        padding: 8px 15px;
        min-width: 60px;
        justify-content: center;
        flex: 0 1 auto;
    }

    .multiplier-icon {
        display: none;
    }

    .multiplier-value {
        font-size: 20px;
    }

    .bottom-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .game-button {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 0;
        padding: 15px 10px;
        font-size: 16px;
        white-space: nowrap;
    }

    .token-display {
        flex: 1 1 100%;
        padding: 10px 20px;
        justify-content: center;
        margin-bottom: 5px;
    }

    .coin-icon {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .token-count {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        gap: 10px;
    }

    .stat-box {
        min-width: 120px;
    }
}