:root {
    --bg-gradient: linear-gradient(to bottom right, #1f003b, #4c1d95, #1f003b);
    --card-bg: rgba(0, 0, 0, 0.2);
    --border-color: rgba(255, 255, 255, 0.2);
    --text-color: #f0e6ff;
    --primary-color: #a78bfa;
    --secondary-color: #f472b6;
    --highlight-color: #fde047;
}

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

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-gradient);
    color: var(--text-color);
    padding: 1rem;
}

.game-container {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
}

.game-header h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 700;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 0.75rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stat-label .icon {
    font-size: 1rem;
}

.stat-value {
    font-size: clamp(2rem, 8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
}

#game-board-container {
    position: relative;
    width: 100%;
    /* Aspect ratio 450 / 600 = 0.75 */
    aspect-ratio: 0.75 / 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

#game-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.score-buckets-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.bucket-value {
    flex: 1;
    font-weight: 700;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.bucket-value.highlight {
    color: var(--highlight-color);
    transform: scale(1.25);
}

.controls {
    margin-top: 1.5rem;
}

.controls-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.drop-button, .new-game-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-button {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    color: white;
}

.drop-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

.new-game-button {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.new-game-button:hover {
    background: rgba(167, 139, 250, 0.2);
}

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