:root {
    --bg-color: #f0f4f8;
    --text-color: #2d3436;
    --accent-color: #6c5ce7;
    --primary-button: #a29bfe;
    --card-bg: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

header h1 {
    font-size: 4rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.hero {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-preview {
    max-width: 100%;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 5px solid white;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.features {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

#features ul {
    padding-left: 1.5rem;
}

#features li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#controls {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.cta {
    text-align: center;
    padding: 4rem 0;
}

#play-now {
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: var(--primary-button);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

#play-now:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

@media (max-width: 390px) {
    header h1 { font-size: 2.5rem; }
    #hero-preview { height: 250px; }
}

#game-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

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

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
}

#hotbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hotbar-slot {
    width: 50px;
    height: 50px;
    border: 3px solid white;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border-radius: 5px;
}

.hotbar-slot[aria-selected="true"] {
    border-color: #a29bfe;
    background: rgba(162, 155, 254, 0.5);
}

#touch-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

@media (max-width: 768px) {
    #touch-controls { display: flex; }
}

#move-stick {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    border: 2px solid white;
}

#btn-jump, #btn-break, #btn-place {
    padding: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    border-radius: 10px;
}
