:root {
    --bg-color: #2d1b2e;
    --text-color: #ffffff;
    --accent-color: #ff0044;
    --ui-bg: rgba(0, 0, 0, 0.7);
    --font-main: 'Press Start 2P', cursive;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1024px;
    background: #000;
    image-rendering: pixelated;
    /* Essential for pixel art */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease;
    pointer-events: auto;
    text-align: center;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

#game-ui {
    background: transparent;
    justify-content: space-between;
    padding: 20px;
    pointer-events: none;
    align-items: center;
}

.title {
    font-size: 2rem;
    line-height: 1.5;
    color: #ffd700;
    text-shadow: 4px 4px #ff0044;
    margin-bottom: 2rem;
}

.instruction {
    font-size: 0.8rem;
    margin-bottom: 3rem;
    color: #fff;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-family: var(--font-main);
    color: #fff;
    background-color: var(--accent-color);
    border: 4px solid #fff;
    cursor: pointer;
    box-shadow: 4px 4px 0px #000;
    transition: transform 0.1s;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.hud-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    text-shadow: 2px 2px #000;
}

/* --- PLATFORM PORTAL STYLES --- */

.platform-body {
    background-color: #0a0a0f;
    font-family: 'Outfit', sans-serif;
    /* Cleaner font for UI */
    color: #fff;
    overflow-y: auto;
    /* Enable scrolling */
    display: block;
    /* Override flex from game body */
    height: auto;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.85);
    /* Slightly darker for contrast */
    backdrop-filter: blur(16px);
    /* Stronger blur */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    /* Larger logo */
    color: #fff;
    letter-spacing: 2px;
}

.navbar .highlight {
    color: var(--accent-color);
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
    margin-left: 40px;
    /* More space between links */
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    background: linear-gradient(90deg, #0a0a0f 0%, rgba(10, 10, 15, 0.8) 50%, rgba(10, 10, 15, 0) 100%), url('assets/background_jungle.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
}

.tag {
    background: var(--accent-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 25px;
    /* More space */
    display: inline-block;
    box-shadow: 0 0 10px var(--accent-color);
}

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 64px;
    /* Larger title */
    margin-bottom: 30px;
    line-height: 1.4;
    /* More breathing room */
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.hero-desc {
    font-size: 20px;
    color: #e0e0e0;
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
    /* Better readability */
    letter-spacing: 0.5px;
}

.play-btn {
    background: #fff;
    color: #000;
    padding: 18px 50px;
    /* Larger button */
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.play-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

.hero-visual {
    position: absolute;
    right: 8%;
    /* Slightly more inset */
    bottom: -50px;
    z-index: 1;
}

.hero-char {
    height: 500px;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
}

/* Game Grid */
.game-grid-section {
    padding: 80px 10%;
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    margin-bottom: 40px;
    border-left: 5px solid var(--accent-color);
    padding-left: 20px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background: #1a1a20;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
}

.game-card:hover:not(.disabled) {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.coming-soon {
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 2px;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.card-info p {
    font-size: 14px;
    color: #888;
}

.disabled {
    opacity: 0.6;
    cursor: default;
}

.site-footer {
    text-align: center;
    padding: 40px;
    color: #444;
    font-size: 12px;
    border-top: 1px solid #222;
}

/* Landing Page Styles */
.landing-page {
    background-image: url('assets/background_jungle.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Dark overlay */
    z-index: -1;
}

.landing-content {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.landing-title {
    font-size: 64px;
    color: #fff;
    text-shadow: 4px 4px 0 #000;
    line-height: 1.2;
    margin-bottom: 0;
}

.landing-title .highlight {
    color: var(--accent-color);
}

.landing-subtitle {
    font-size: 24px;
    color: #ccc;
    letter-spacing: 4px;
    margin-top: -20px;
}

.features {
    display: flex;
    gap: 20px;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    font-family: var(--font-main);
    font-size: 24px;
    padding: 20px 40px;
    text-decoration: none;
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.5);
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
    margin-top: 20px;
}

.cta-button:hover {
    transform: scale(1.1);
    background-color: #ff3366;
    box-shadow: 0 0 30px rgba(255, 0, 68, 0.8);
}

.controls-hint {
    margin-top: 40px;
    color: #555;
    font-size: 10px;
}

.input-display {
    position: absolute;
    bottom: 20%;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border: 2px solid white;
    min-height: 1.5em;
    min-width: 200px;
    text-align: center;
}

.matched {
    color: #0f0;
}

.upcoming {
    color: #fff;
}

.final-score {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}