@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Grotesk:wght@400;700&display=swap');

:root {
    --color-vibrant-pink: #FF00FF;
    --color-vibrant-cyan: #00FFFF;
    --color-vibrant-yellow: #FFFF00;
    --color-vibrant-green: #00FF00;
    --color-bg-dark: #1a1a1a;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--color-bg-dark);
    color: white;
}

h1, h2, h3, .pixel-font {
    font-family: 'Press Start 2P', cursive;
}

/* Layout Classes */
.game-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.section-top {
    flex: 0 0 auto;
    background: #000;
    border-bottom: 4px solid var(--color-vibrant-cyan);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-middle {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
}

.section-bottom {
    flex: 0 0 auto;
    padding: 15px;
    background: #000;
    border-top: 4px solid var(--color-vibrant-pink);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Custom Slider Styling */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  margin: 20px 0;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: var(--color-vibrant-yellow);
  border: 4px solid #000;
  cursor: pointer;
  margin-top: -10px; 
  box-shadow: 2px 2px 0px var(--color-vibrant-pink);
  position: relative;
  z-index: 20;
}

input[type=range]::-moz-range-thumb {
  height: 30px;
  width: 30px;
  border: 4px solid #000;
  border-radius: 50%;
  background: var(--color-vibrant-yellow);
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--color-vibrant-pink);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--color-vibrant-cyan), var(--color-vibrant-pink));
  border-radius: 5px;
  border: 2px solid #fff;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    background: linear-gradient(90deg, var(--color-vibrant-cyan), var(--color-vibrant-pink));
    border-radius: 5px;
    border: 2px solid #fff;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.avatar-option {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #444;
    cursor: pointer;
    font-size: 24px;
    background: #2a2a2a;
    transition: transform 0.1s;
}

.avatar-option:hover {
    transform: scale(1.05);
}

.avatar-option.selected {
    border-color: var(--color-vibrant-green);
    background-color: #333;
    box-shadow: 0 0 10px var(--color-vibrant-green);
}

.avatar-option.taken {
    opacity: 0.3;
    pointer-events: none;
    background-color: #000;
}

.btn-vibrant {
    background: var(--color-vibrant-pink);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    padding: 15px;
    border: 2px solid white;
    box-shadow: 4px 4px 0px var(--color-vibrant-cyan);
    transition: all 0.1s;
    text-shadow: 1px 1px 0 #000;
}

.btn-vibrant:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--color-vibrant-cyan);
}

.btn-player-select {
    background: #333;
    border: 2px solid #555;
    color: white;
    transition: all 0.2s;
}
.btn-player-select:hover {
    border-color: var(--color-vibrant-yellow);
    background: #444;
}

.score-badge {
    background: #333;
    border: 1px solid var(--color-vibrant-cyan);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Scoreboard Animations */
.scoreboard-entry {
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; 
}

.scoreboard-entry:nth-child(1) { animation-delay: 0.1s; }
.scoreboard-entry:nth-child(2) { animation-delay: 0.3s; }
.scoreboard-entry:nth-child(3) { animation-delay: 0.5s; }

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
