@font-face {
    font-family: 'PixelType';
    src: url('../fonts/font.ttf');
}

:root {
    --bg-blue: rgb(94, 129, 162);
    --mint: rgb(111, 196, 169);
    --dark: rgb(64, 64, 64);
    --black: #0f0f0f;
}

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

body {
    background-color: var(--black);
    color: white;
    font-family: 'PixelType', monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

.scanline {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 100;
    pointer-events: none;
}

.hero {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1rem;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--mint);
    margin-bottom: 1rem;
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    border: 4px solid var(--dark);
}

.game-view {
    flex: 3;
    background-color: var(--bg-blue);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
}

.ui-overlay {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--dark);
}

.title {
    font-size: clamp(5rem, 15vw, 10rem);
    color: var(--mint);
    text-shadow: 6px 6px 0px var(--dark);
    line-height: 1;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 2rem);
    text-align: center;
}

.environment {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 25%;
    background: #5c7d8a;
    border-top: 4px solid var(--dark);
}

.pixel-sprite.snail {
    height: 35px;
}

.player-wrapper {
    position: absolute;
    bottom: 10px;
    left: 10%;
    animation: bob 0.5s infinite alternate;
}


.pixel-sprite.player {
    height: 80px;
}

.enemy-wrapper {
    position: absolute;
    bottom: 10px;
    right: -100px;
    animation: slide-enemy 4s linear infinite;
}

.panel {
    flex: 1;
    background: var(--dark);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    align-items: center;
}

.cta-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn {
    text-decoration: none;
    text-align: center;
    border: 3px solid white;
    padding: 0.5rem;
    transition: 0.2s;
}

.btn-main { background: var(--mint); color: var(--dark); }
.btn-alt { color: white; border-color: var(--mint); }

.btn:hover { transform: scale(1.02); filter: brightness(1.2); }

.btn-top { display: block; font-size: 1.5rem; font-weight: bold; }
.btn-sub { font-size: 0.8rem; opacity: 0.8; }

.technologies {
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 2px solid rgba(255,255,255,0.1);
    padding-left: 1.5rem;
}

.spec span { color: var(--mint); }

.input-hints {
    text-align: center;
    padding: 1rem 0;
    color: #555;
    font-size: 1.2rem;
}

@keyframes slide-enemy {
    from { right: -20%; }
    to { right: 120%; }
}

@keyframes bob {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

@media (max-width: 600px) {
    .panel { grid-template-columns: 1fr; }
    .technologies { border-left: none; border-top: 2px solid #444; padding: 1rem 0 0 0; }
    .divider { display: none; }
    .input-hints span { display: block; }
}
/* Leaderboard Specific Adjustments */
.leaderboard-view {
    justify-content: flex-start; /* Move content to top */
    padding: 1.5rem;
}

.list-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 3rem;
    color: var(--mint);
}

.back-btn {
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    padding: 5px 10px;
    background: var(--dark);
}

.player-list {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent breaking the container */
}

.table-head {
    display: flex;
    justify-content: space-between;
    color: var(--dark);
    font-size: 1.2rem;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.scroll-area {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

/* Custom Scrollbar for the Retro Look */
.scroll-area::-webkit-scrollbar { width: 8px; }
.scroll-area::-webkit-scrollbar-track { background: var(--dark); }
.scroll-area::-webkit-scrollbar-thumb { background: var(--mint); }

.player-row {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 6px;
    padding: 12px 1rem;
    font-size: 1.8rem;
    border-left: 4px solid transparent;
}

.player-row.gold {
    border-left-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.player-row .rank { color: var(--mint); width: 60px; }
.player-row .name { flex: 1; text-align: left; }
.player-row .score { color: white; }

.stats-summary {
    display: flex;
    flex-direction: column;
    padding-left: 10px;
    border-left: 4px solid var(--mint);
}