/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    /* Color Palette - Vibrant, Playful, "Toy-like" */
    --color-primary: #ff6b6b;
    --color-primary-dark: #ee5253;
    --color-secondary: #48dbfb;
    --color-secondary-dark: #0abde3;
    --color-accent: #feca57;
    
    --color-bg: #f7f9fc;
    --color-bg-light: #ffffff;
    
    --color-text-main: #222f3e;
    --color-text-muted: #576574;
    
    /* Category Colors */
    --cat-blue: #54a0ff;
    --cat-green: #1dd1a1;
    --cat-orange: #ff9f43;
    --cat-purple: #5f27cd;

    /* Shadows for Claymorphism/3D effect */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-pop: 0 8px 0 rgba(0,0,0,0.15), 0 15px 20px rgba(0,0,0,0.1);
    --shadow-pop-hover: 0 4px 0 rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.1);
    
    --shadow-clay: 
        10px 10px 20px rgba(0,0,0,0.05),
        -10px -10px 20px rgba(255,255,255,0.8),
        inset 0 -5px 10px rgba(0,0,0,0.05),
        inset 0 5px 10px rgba(255,255,255,0.8);

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 36px;
    --radius-pill: 100px;
    
    /* Typography */
    --font-heading: 'Fredoka One', cursive, sans-serif;
    --font-body: 'Nunito', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, .logo-text {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Background Utilities for Cards */
.bg-blue { background-color: var(--cat-blue); }
.bg-green { background-color: var(--cat-green); }
.bg-orange { background-color: var(--cat-orange); }
.bg-purple { background-color: var(--cat-purple); }

.bg-gradient-1 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); }
.bg-gradient-2 { background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%); }
.bg-gradient-3 { background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%); }
.bg-gradient-4 { background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-secondary {
    background-color: white;
    color: var(--color-text-main);
    box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-clay);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.25rem;
}

.btn-full {
    width: 100%;
}

.shadow-pop {
    box-shadow: var(--shadow-pop);
    transform: translateY(0);
}

.shadow-pop:hover {
    box-shadow: var(--shadow-pop-hover);
    transform: translateY(4px);
    background-color: var(--color-primary-dark);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 2px solid rgba(0,0,0,0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    animation: bounce 2s infinite ease-in-out;
}

.logo-text {
    font-size: 1.8rem;
    color: var(--color-text-main);
}

.logo .highlight {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Abstract Background Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.6;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--color-secondary);
    top: -100px;
    right: -100px;
    animation: float 8s infinite alternate ease-in-out;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    bottom: 10%;
    left: -50px;
    animation: float 6s infinite alternate-reverse ease-in-out;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--color-accent);
    top: 30%;
    left: 40%;
    animation: float 10s infinite alternate ease-in-out;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border: 2px solid white;
    border-radius: var(--radius-pill);
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-text-main);
}

.stat-label {
    font-weight: 700;
    color: var(--color-text-muted);
}

/* Hero Visual 3D Mockup */
.mockup-container {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1000px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 3px solid white;
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-clay);
    transform-style: preserve-3d;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.card-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-text-main);
}

.card-puzzle {
    top: 10%;
    left: 10%;
    width: 180px;
    height: 200px;
    animation: float 4s infinite alternate ease-in-out;
    z-index: 3;
}

.card-sim {
    bottom: 15%;
    left: 30%;
    width: 220px;
    height: 180px;
    animation: float 5s infinite alternate-reverse ease-in-out;
    z-index: 2;
}

.card-action {
    top: 25%;
    right: 5%;
    width: 200px;
    height: 220px;
    animation: float 4.5s infinite alternate ease-in-out;
    z-index: 1;
}

.center-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 30% 30%, var(--color-secondary-dark), var(--color-secondary));
    border-radius: 50%;
    box-shadow: inset -20px -20px 40px rgba(0,0,0,0.1), 0 20px 40px rgba(10, 189, 227, 0.3);
    z-index: 0;
}

/* ==========================================================================
   Categories Section (Bento Grid)
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid transparent;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-bg);
    box-shadow: var(--shadow-clay);
}

.cat-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.1);
}

.cat-icon {
    font-size: 2.5rem;
}

.category-card h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.category-card p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.cat-link {
    font-weight: 800;
    color: var(--color-primary);
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
}

.cat-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Trending Games Section
   ========================================================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.game-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,0,0,0.05);
    box-shadow: var(--shadow-clay);
}

.game-cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-emoji {
    font-size: 5rem;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.game-card:hover .game-emoji {
    transform: scale(1.15) rotate(5deg);
}

.game-info {
    padding: 24px;
}

.game-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    background: var(--color-bg);
    color: var(--color-text-muted);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
}

.game-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.game-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #1e272e;
    color: white;
    padding: 80px 0 24px;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer .logo-text {
    color: white;
}

.footer-desc {
    margin-top: 20px;
    color: #808e9b;
    max-width: 400px;
}

.link-group h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.link-group ul li {
    margin-bottom: 12px;
}

.link-group ul li a {
    color: #808e9b;
    transition: color 0.2s;
    font-weight: 600;
}

.link-group ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #808e9b;
    font-weight: 600;
}

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

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions, .hero-stats {
        justify-content: center;
    }
    
    .badge {
        margin: 0 auto 24px;
    }
    
    .hero-visual {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
