/* ===== DESIGN TOKENS ===== */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;

    --accent-primary: #7c5cfc;
    --accent-secondary: #5e8cff;
    --accent-glow: rgba(124, 92, 252, 0.4);
    --accent-gradient: linear-gradient(135deg, #7c5cfc, #5e8cff);

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Badge colors */
    --badge-featured: #fbbf24;
    --badge-genre: rgba(124, 92, 252, 0.3);

    /* Spacing */
    --section-padding: 120px 0;
    --container-max: 1200px;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: 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;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

/* ===== BACKGROUND CANVAS ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* ===== NAVIGATION ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 2rem;
    transition: all 0.4s var(--ease-smooth);
    backdrop-filter: blur(0px);
    background: transparent;
}

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

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: transform 0.3s var(--ease-bounce);
}

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

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s var(--ease-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
    transition: width 0.3s var(--ease-smooth);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s var(--ease-smooth);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    z-index: 99;
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s var(--ease-smooth);
}

.mobile-menu.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.mobile-link {
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.3s var(--ease-smooth);
}

.mobile-link:hover {
    color: var(--accent-primary);
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 780px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(124, 92, 252, 0.1);
    border: 1px solid rgba(124, 92, 252, 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.1s both;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.2s both;
}

.hero-line {
    display: block;
    color: var(--text-secondary);
    font-size: 0.45em;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.hero-name {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.3s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.4s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.5s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.8s var(--ease-smooth) 0.7s both;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--accent-gradient);
    animation: scrollPulse 2s var(--ease-smooth) infinite;
}

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

/* ===== SECTION COMMON ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== GAMES SECTION ===== */
.games-section {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
    z-index: 1;
}

.games-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* Game Card */
.game-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-smooth);
    opacity: 0;
    transform: translateY(30px);
}

.game-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.game-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(124, 92, 252, 0.08);
}

.game-card.featured {
    grid-column: span 2;
}

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

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-smooth);
}

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

.game-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

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

.play-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 30px var(--accent-glow);
    transform: scale(0.8);
    transition: transform 0.3s var(--ease-bounce);
}

.game-card:hover .play-icon {
    transform: scale(1);
}

.game-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.badge {
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-featured {
    background: rgba(251, 191, 36, 0.2);
    color: var(--badge-featured);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-genre {
    background: var(--badge-genre);
    color: var(--accent-primary);
    border: 1px solid rgba(124, 92, 252, 0.3);
}

.game-card-body {
    padding: 1.5rem;
}

.game-card-body .game-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.game-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tag {
    padding: 0.25rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all 0.3s var(--ease-smooth);
}

.game-card:hover .tag {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.game-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: all 0.3s var(--ease-smooth);
}

.game-link svg {
    transition: transform 0.3s var(--ease-smooth);
}

.game-link:hover {
    color: var(--accent-secondary);
}

.game-link:hover svg {
    transform: translateX(4px);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
    z-index: 1;
}

.about-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.tech-stack {
    margin-top: 2.5rem;
}

.tech-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.tech-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s var(--ease-smooth);
}

.tech-item:hover {
    border-color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.05);
    transform: translateY(-2px);
}

.tech-icon {
    font-size: 1.2rem;
}

.tech-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Code Window */
.code-window {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-filename {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', monospace;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Space Grotesk', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    font-family: inherit;
}

.code-keyword { color: #c792ea; }
.code-var { color: #82aaff; }
.code-prop { color: #f78c6c; }
.code-string { color: #c3e88d; }
.code-number { color: #f78c6c; }
.code-func { color: #82aaff; }

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s var(--ease-smooth);
}

.contact-link:hover {
    border-color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 92, 252, 0.1);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-text {
    text-align: left;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
    padding: 2rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .game-card.featured {
        grid-column: span 1;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

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

    .nav-toggle {
        display: flex;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .tech-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 6rem 1.5rem 3rem;
    }

    .tech-items {
        grid-template-columns: 1fr;
    }

    .games-grid {
        padding: 0;
    }
}
