/* ==========================================
   TROLL GAMES - Premium Dark Theme
   ========================================== */

/* --- Design Tokens --- */
:root {
    --color-bg: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-card: rgba(255, 255, 255, 0.04);
    --color-surface: rgba(255, 255, 255, 0.06);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-text: #e8e8ed;
    --color-text-muted: #8b8b9e;
    --color-text-dim: #5a5a6e;
    --color-accent: #7c5cfc;
    --color-accent-light: #a78bfa;
    --color-accent-glow: rgba(124, 92, 252, 0.25);
    --color-secondary: #00d4aa;
    --color-gradient-start: #7c5cfc;
    --color-gradient-end: #00d4aa;

    --font-display: 'Inter', sans-serif;
    --font-body: 'Noto Sans KR', 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 60px rgba(124, 92, 252, 0.15);

    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* --- Glass Card --- */
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    transition: var(--transition-base);
}

.nav-logo:hover {
    transform: scale(1.03);
}

.logo-troll {
    color: var(--color-accent-light);
}

.logo-games {
    color: var(--color-text);
    font-weight: 600;
}

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

.nav-link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 1px;
    transition: transform var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(124, 92, 252, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 20% 70%, rgba(124, 92, 252, 0.06) 0%, transparent 50%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -10px;
    background: var(--color-accent-light);
    border-radius: 50%;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100vh) scale(0.3);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--color-accent-light);
    padding: 8px 20px;
    border: 1px solid rgba(124, 92, 252, 0.3);
    border-radius: 50px;
    margin-bottom: 32px;
    background: rgba(124, 92, 252, 0.08);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-title-line {
    display: block;
}

.hero-title-line.accent {
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: var(--color-text-muted);
    margin-bottom: 48px;
    letter-spacing: 0.15em;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 14px 36px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    color: #fff;
    box-shadow: 0 4px 24px var(--color-accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(124, 92, 252, 0.4);
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent-light), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
    padding: 120px 0;
    position: relative;
}

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

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--color-accent-light);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.01em;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
    background: var(--color-bg-secondary);
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    padding: 40px 32px;
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    opacity: 0;
    transition: var(--transition-base);
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 92, 252, 0.2);
    box-shadow: var(--shadow-glow);
}

.about-card:hover::before {
    opacity: 1;
}

.about-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(124, 92, 252, 0.1);
    color: var(--color-accent-light);
}

.about-card-icon svg {
    width: 28px;
    height: 28px;
}

.about-card h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ==========================================
   GAMES SECTION
   ========================================== */
.games {
    background: var(--color-bg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.game-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    cursor: default;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 92, 252, 0.25);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.game-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-card-image img {
    transform: scale(1.05);
}

.game-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition-base);
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-genre {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--color-accent);
    color: #fff;
}

.game-card-content {
    padding: 28px 32px;
}

.game-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.game-title-en {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--color-accent-light);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.game-desc {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

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

.footer-logo {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--color-text-dim);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px;
        margin: 0 auto;
    }

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

    .section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        transition: right var(--transition-base);
        border-left: 1px solid var(--color-border);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-link {
        font-size: 1rem;
        padding: 12px 24px;
    }

    .hero-title {
        font-size: clamp(2.8rem, 12vw, 5rem);
    }

    .section {
        padding: 64px 0;
    }

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

    .game-card-content {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 6px 16px;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.08em;
    }

    .about-card {
        padding: 28px 24px;
    }
}
