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

:root {
    --primary-color: #2980b9;
    --secondary-color: #f1c40f;
    --background-color: #ecf0f1;
    --card-bg-color: #ffffff;
    --text-color: #34495e;
    --title-color: #c0392b;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --accent-color: #ff6f3c;
    --glow-color: rgba(255, 111, 60, 0.35);
    --bg-start: #fef7e6;
    --bg-end: #e9f3ff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fredoka', 'Gowun Dodum', sans-serif;
    background: radial-gradient(circle at 20% 20%, var(--bg-start), transparent 55%),
        radial-gradient(circle at 80% 10%, #fff1c1, transparent 45%),
        linear-gradient(120deg, var(--bg-end), #f0fff4);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1.03rem;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(52, 73, 94, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.35;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    background: linear-gradient(135deg, #1f6aa0, #2f9ae0);
    color: var(--white);
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.lang-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    backdrop-filter: blur(6px);
}

.lang-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1f2d3d;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lang-btn.is-active {
    background: #ffffff;
    transform: translateY(-1px);
}

.hero-slider {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
}

.hero-slide {
    display: none;
    padding: 30px 0;
    position: relative;
}

.hero-slide.is-active {
    display: block;
    animation: hero-fade 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.5;
    z-index: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 214, 107, 0.5), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(255, 122, 89, 0.4), transparent 50%);
}

.hero-slide:nth-child(2)::before {
    background: radial-gradient(circle at 20% 20%, rgba(142, 249, 204, 0.55), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(89, 208, 255, 0.45), transparent 50%);
}

.hero-slide:nth-child(3)::before {
    background: radial-gradient(circle at 20% 20%, rgba(255, 226, 143, 0.6), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(255, 209, 244, 0.5), transparent 50%);
}

.hero-content {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: 32px 36px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.6rem;
    margin: 12px 0 8px;
    color: #1f2d3d;
}

.hero-content p {
    margin-bottom: 20px;
    color: rgba(31, 45, 61, 0.8);
    font-size: 1.1rem;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1c2c3a;
    background: linear-gradient(120deg, #ffd86f, #ff9f78);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.hero-tag--mint {
    background: linear-gradient(120deg, #8ef9cc, #59d0ff);
}

.hero-tag--sun {
    background: linear-gradient(120deg, #ffe28f, #ffd1f4);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(120deg, #ff7a59, #ffd56b);
    color: #1f2d3d;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(31, 45, 61, 0.3);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #1f2d3d;
}

/* Sections */
.section {
    padding: 60px 20px;
}

.section-hero {
    padding-bottom: 30px;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--title-color);
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.8);
}

.section-subtitle {
    text-align: center;
    margin: -2rem auto 2rem;
    max-width: 520px;
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(52, 73, 94, 0.8);
}

.section-shelf {
    padding-top: 30px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2rem;
}

.section-header h2 {
    text-align: left;
    margin-bottom: 0;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1c2c3a;
    background: linear-gradient(120deg, #ffd86f, #ff9f78);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.section-tag--mint {
    background: linear-gradient(120deg, #8ef9cc, #59d0ff);
}

.section-tag--sun {
    background: linear-gradient(120deg, #ffe28f, #ffd1f4);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-chip {
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2d3d;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 14px rgba(31, 45, 61, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(31, 45, 61, 0.16);
}

.filter-chip.is-active {
    background: linear-gradient(120deg, #ff7a59, #ffd56b);
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background-color: var(--card-bg-color);
    border-radius: 18px;
    box-shadow: 0 5px 15px var(--shadow-color);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(10px);
    opacity: 0;
    animation: card-float-in 0.8s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.15s; }
.game-card:nth-child(3) { animation-delay: 0.25s; }
.game-card:nth-child(4) { animation-delay: 0.35s; }

.game-card:hover {
    transform: translateY(-12px) rotate(-0.6deg);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2), 0 0 0 3px var(--glow-color);
}

.game-card.is-hidden {
    display: none;
}

.game-card::after {
    content: "";
    position: absolute;
    inset: -30% -20% auto auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.9), transparent 70%);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-card:hover::after {
    opacity: 0.8;
    transform: translateY(0);
}

.game-card--featured {
    border: 2px solid rgba(255, 111, 60, 0.45);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(255, 111, 60, 0.15);
}

.game-card--featured .game-card-image {
    background-image: linear-gradient(45deg, #ff7a59, #ffd56b);
}

.game-card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #1f2d3d;
    background: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.badge-hot {
    background: linear-gradient(120deg, #ff7a59, #ffb26b);
    color: #2a1206;
}

.badge-new {
    background: linear-gradient(120deg, #6ee7ff, #a3ffb5);
    color: #0e2a1f;
}

.game-card-image {
    height: 180px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    /* Placeholder for an image or icon */
    background-image: linear-gradient(45deg, #f1c40f, #f39c12);
    position: relative;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card-image--tictactoe {
    background-image: linear-gradient(45deg, #ff7a59, #ffd56b);
}

.game-card-image--neon {
    background-image: linear-gradient(45deg, #6a5cff, #00d4ff);
}

.game-card-image--puzzle {
    background-image: linear-gradient(45deg, #8ef9cc, #59d0ff);
}

.game-card-image--runner {
    background-image: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.game-card-image--retro {
    background-image: linear-gradient(45deg, #f6d365, #fda085);
}

.game-card-image--mystery {
    background-image: linear-gradient(45deg, #a18cd1, #fbc2eb);
}

.game-card-image--ocean {
    background-image: linear-gradient(45deg, #43cea2, #185a9d);
}

.game-card-image--strategy {
    background-image: linear-gradient(45deg, #c79081, #dfa579);
}

.game-card-image--speed {
    background-image: linear-gradient(45deg, #89f7fe, #66a6ff);
}

.game-card-image::after {
    content: "";
    position: absolute;
    inset: -40% 0 auto 0;
    height: 140%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.game-card:hover .game-card-image::after {
    transform: translateX(120%);
}

.game-card h3 {
    color: var(--primary-color);
    margin: 1rem 1.5rem 0.5rem;
    font-size: 1.65rem;
}

.game-card p {
    margin: 0 1.5rem 1rem;
    font-size: 1.05rem;
    flex-grow: 1;
}

.game-card-meta {
    display: flex;
    justify-content: space-between;
    margin: 0 1.5rem 1.2rem;
    font-size: 0.95rem;
    color: rgba(52, 73, 94, 0.7);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

@keyframes card-float-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .game-card:hover {
        transform: none;
    }
    .game-card-image::after {
        transition: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .section h2 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-inner {
        flex-direction: column;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
}
