/* Base Reset & Variables */
:root {
    --bg-color: #050508;
    --card-bg: rgba(15, 15, 20, 0.6);
    --primary: #00e5ff;
    --secondary: #bd00ff;
    --accent: #ffcc00;
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 15px var(--primary);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.glow-text {
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5), 0 0 20px rgba(0, 229, 255, 0.3);
}

/* Layout Items */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) saturate(1.2);
    transform: scale(1.1);
    transition: transform 0.1s ease-out;
}

.hero-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
    background: radial-gradient(circle, rgba(5, 5, 8, 0.7) 0%, transparent 80%);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4));
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    width: 200px;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    box-shadow: 0 5px 20px rgba(189, 0, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.6);
}

.btn-outline:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

/* Features */
.features {
    padding: 100px 0;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

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

.feature-card {
    padding: 40px;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

/* Gameplay Gallery */
.gallery {
    padding: 100px 0;
    background: rgba(10, 10, 15, 0.5);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--glass-border);
    background: #000;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    image-rendering: pixelated;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Controls */
.controls {
    padding: 100px 0;
}

.controls-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.key-cap {
    background: #2a2a35;
    padding: 10px 20px;
    border-radius: 8px;
    border-bottom: 4px solid #1a1a25;
    font-family: monospace;
    font-weight: bold;
    color: var(--primary);
}

/* Footer */
footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0px);
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .hero-btns {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 20px;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .section-title {
        font-size: 2rem;
    }
    .feature-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.8rem;
    }
}

/* Music Toggle Refined */
.music-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-shadow: none;
}

.music-btn:hover {
    background: rgba(0, 229, 255, 0.1);
}

.music-btn.playing {
    border-color: var(--secondary);
    color: var(--secondary);
    animation: pulse-music 2s infinite;
}

.music-btn.playing .icon {
    animation: rotate-music 3s linear infinite;
}

@keyframes rotate-music {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-music {
    0% { box-shadow: 0 0 0 0 rgba(188, 71, 254, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(188, 71, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(188, 71, 254, 0); }
}

@media (max-width: 768px) {
    .music-btn {
        width: 100%;
        justify-content: center;
    }
}
