:root {
    --pink: #ff006e;
    --purple: #8338ec;
    --blue: #3a86ff;
    --green: #06d6a0;
    --orange: #fb5607;
    --yellow: #ffbe0b;
    --dark: #1a1033;
    --darker: #0f0a1e;
    --radius: 20px;
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fredoka', 'Nunito', system-ui, -apple-system, sans-serif;
    background: var(--darker);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 10, 30, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--pink), var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: #bbb;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(15, 10, 30, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== SECTIONS ===== */
.page-section {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s var(--bounce);
}

.page-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ===== HERO ===== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(131, 56, 236, 0.3) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(255, 0, 110, 0.2) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(58, 134, 255, 0.15) 0%, transparent 60%);
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    animation: blob-float 8s ease-in-out infinite;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--pink);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: var(--purple);
    top: 60%;
    right: -5%;
    animation-delay: -3s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: var(--blue);
    bottom: 10%;
    left: 30%;
    animation-delay: -5s;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--yellow), var(--orange), var(--pink), var(--purple));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: #c0b0e0;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s var(--bounce);
    box-shadow: 0 8px 30px rgba(131, 56, 236, 0.4);
}

.hero-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 40px rgba(131, 56, 236, 0.6);
}

.hero-btn span {
    font-size: 1.4rem;
}

/* Floating shapes */
.floating-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 16px;
    animation: shape-float 6s ease-in-out infinite;
}

.shape-1 {
    width: 60px;
    height: 60px;
    background: var(--yellow);
    opacity: 0.3;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    transform: rotate(15deg);
}

.shape-2 {
    width: 40px;
    height: 40px;
    background: var(--green);
    opacity: 0.25;
    top: 30%;
    right: 20%;
    animation-delay: -2s;
    border-radius: 50%;
}

.shape-3 {
    width: 50px;
    height: 50px;
    background: var(--orange);
    opacity: 0.2;
    bottom: 25%;
    left: 20%;
    animation-delay: -4s;
    border-radius: 50%;
}

.shape-4 {
    width: 35px;
    height: 35px;
    background: var(--blue);
    opacity: 0.3;
    bottom: 30%;
    right: 15%;
    animation-delay: -1s;
    transform: rotate(45deg);
}

@keyframes shape-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ===== GAMES SECTION ===== */
.games-section {
    padding: 120px 24px 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: #9088a8;
    font-size: 1.1rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.game-card {
    background: linear-gradient(145deg, #231845, #1a1040);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 36px 24px 28px;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s var(--bounce);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--card-color, var(--purple)) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 40px color-mix(in srgb, var(--card-color, var(--purple)) 15%, transparent);
}

.game-card:hover::before {
    opacity: 0.15;
}

.game-card-icon {
    font-size: 3.5rem;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    animation: bounce-idle 3s ease-in-out infinite;
}

@keyframes bounce-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.game-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.game-card p {
    font-size: 0.9rem;
    color: #9088a8;
    line-height: 1.5;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.play-btn {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--card-color, var(--purple)), color-mix(in srgb, var(--card-color, var(--purple)) 70%, #fff));
    color: #fff;
    border: none;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.game-card:hover .play-btn {
    transform: scale(1.05);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--card-color, var(--purple)) 40%, transparent);
}

.coming-soon-card {
    border: 2px dashed rgba(255, 255, 255, 0.08);
    background: transparent;
    cursor: default;
    min-height: 240px;
    justify-content: center;
}

.coming-soon-card .game-card-icon {
    opacity: 0.3;
    animation: none;
}

.coming-soon-card p {
    color: #5a5078;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 120px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content {
    max-width: 600px;
    text-align: center;
}

.about-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p {
    font-size: 1.1rem;
    color: #b0a0d0;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-avatars {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.avatar-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 8px 24px rgba(131, 56, 236, 0.3);
}

.avatar-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #d0c0f0;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: #5a5078;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .games-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .about-avatars {
        gap: 16px;
    }

    .avatar-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }
}

/* ===== PAGE TRANSITION ANIMATION ===== */
.page-section.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.page-section.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.1s, transform 0.4s var(--bounce) 0.1s;
}
