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

:root {
    --bg: #050509;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.14);
    --text-primary: #eeeef2;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.22);
    --accent: #c8d6e5;
    --glow: rgba(255, 255, 255, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== NOISE TEXTURE OVERLAY ===== */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.018;
    pointer-events: none;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ===== CANVAS BG ===== */

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

header, main, footer {
    position: relative;
    z-index: 1;
}

/* ===== SCROLL PROGRESS ===== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0.8), rgba(255,255,255,0.3));
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ===== MOUSE SPOTLIGHT ===== */

.mouse-spotlight {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.025) 0%, transparent 50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

/* ===== ANIMATIONS ===== */

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

@keyframes subtlePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

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

/* ===== HEADER ===== */

header {
    position: relative;
    background: radial-gradient(ellipse at 50% 0%, rgba(15, 15, 40, 0.9) 0%, var(--bg) 70%);
    overflow: hidden;
    padding-bottom: 1px;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 32px;
    position: relative;
}

.logo {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    margin-bottom: 28px;
    filter: drop-shadow(0 0 60px rgba(255, 255, 255, 0.06)) drop-shadow(0 8px 32px rgba(0,0,0,0.5));
    animation: scaleIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards, float 6s ease-in-out 1.5s infinite;
    border: none;
}

h1 {
    font-size: 3.6rem;
    font-weight: 900;
    letter-spacing: 14px;
    color: #fff;
    perspective: 600px;
    margin-bottom: 6px;
}

h1 span {
    color: #fff;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 6px;
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: 600;
    min-height: 1.4em;
}

/* ===== STATS BAR ===== */

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 44px 20px 24px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-box:nth-child(1) { animation-delay: 0.4s; }
.stat-box:nth-child(2) { animation-delay: 0.55s; }
.stat-box:nth-child(3) { animation-delay: 0.7s; }

.stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #4ade80;
    line-height: 1;
    letter-spacing: -1px;
    animation: subtlePulse 4s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
}

.stat-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
}

/* ===== HEADER SOCIALS ===== */

.header-socials {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px 48px;
    opacity: 0;
    animation: fadeInUp 0.7s ease 0.9s both;
}

.header-socials a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.header-socials a:hover {
    color: #fff;
    border-color: var(--border-hover);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-socials svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ===== SECTIONS ===== */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 28px 80px;
}

.section {
    margin-bottom: 100px;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
}

.section-accent {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 2px;
    margin-top: 16px;
}


/* ===== GRID ===== */

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 60px;
    grid-column: 1 / -1;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-top-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin-left: 10px;
    vertical-align: middle;
    animation: spin 0.8s linear infinite;
}

.error { color: #f87171; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.grid.collapsed .card:nth-child(n+4) {
    display: none;
}

/* ===== SHOW MORE ===== */

.show-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.show-more-btn {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 14px 48px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.5px;
}

.show-more-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    color: #fff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ===== GAME CARDS ===== */

.card {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s;
    background: #0a0a16;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.card a {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #0a0a16;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s;
}

.card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.15);
}

.card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 18px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    z-index: 1;
}

.card .overlay h2 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px 0;
    line-height: 1.3;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card .overlay .card-stats {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.card .overlay .card-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

/* ===== LIVE INDICATOR ===== */

.card-stats .live-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: subtlePulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* ===== CASE STUDIES GRID BACKGROUND ===== */

.case-studies-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 28px;
    padding-right: 28px;
}

.grid-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    perspective: 800px;
}

.grid-bg-inner {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -30%;
    left: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotateX(50deg);
    transform-origin: 50% 50%;
    animation: gridScroll 8s linear infinite;
    mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, black 15%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, black 15%, transparent 65%);
}

/* Animated glow nodes at grid intersections */
.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle 2px at 30% 25%, rgba(140, 180, 255, 0.3) 0%, transparent 100%),
        radial-gradient(circle 2px at 70% 35%, rgba(140, 180, 255, 0.25) 0%, transparent 100%),
        radial-gradient(circle 2px at 50% 55%, rgba(140, 180, 255, 0.2) 0%, transparent 100%),
        radial-gradient(circle 3px at 20% 60%, rgba(160, 140, 255, 0.2) 0%, transparent 100%),
        radial-gradient(circle 3px at 80% 50%, rgba(160, 140, 255, 0.15) 0%, transparent 100%);
    animation: glowPulse 4s ease-in-out infinite alternate;
    opacity: 0.7;
}

/* Horizontal scan line effect */
.grid-bg::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(140, 180, 255, 0.2), rgba(255, 255, 255, 0.08), rgba(140, 180, 255, 0.2), transparent);
    animation: scanLine 6s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(140, 180, 255, 0.08), 0 0 60px rgba(140, 180, 255, 0.03);
}

@keyframes gridScroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 60px; }
}

@keyframes glowPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

@keyframes scanLine {
    0%, 100% { top: 15%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    50% { top: 85%; }
}

/* ===== CASE STUDIES ===== */

.testimonials-grid {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.testimonial {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
    background: linear-gradient(145deg, rgba(18, 18, 35, 0.9), rgba(12, 12, 24, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

.testimonial:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.testimonial-content {
    flex: 1;
    min-width: 0;
}

.testimonial-media-wrap {
    width: 100%;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.testimonial-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.testimonial-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.testimonial-handle {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.testimonial-x {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    margin-left: auto;
    transition: fill 0.3s, transform 0.3s;
}

.testimonial:hover .testimonial-x {
    fill: var(--text-secondary);
    transform: scale(1.1);
}

.testimonial-text {
    font-size: 0.8rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 14px;
}

.testimonial-text br {
    content: '';
    display: block;
    margin-top: 4px;
}

.testimonial-media {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial:hover .testimonial-media {
    transform: scale(1.015);
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.testimonial-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.testimonial-likes {
    font-size: 0.7rem;
    color: rgba(224, 69, 123, 0.7);
}

/* ===== FOOTER SOCIALS ===== */

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

.socials a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.socials a:hover {
    color: #fff;
    border-color: var(--border-hover);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.socials svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* ===== FOOTER ===== */

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 48px 20px 56px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 1px;
}

.footer-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    opacity: 0.15;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        letter-spacing: 6px;
    }

    .hero {
        padding: 70px 20px 24px;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .stats-bar {
        gap: 32px;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .grid.collapsed .card:nth-child(n+3) {
        display: none;
    }

    .testimonials-grid {
        flex-direction: column;
    }

    .card .overlay h2 {
        font-size: 0.85rem;
    }

    .card .overlay .card-stats {
        font-size: 0.75rem;
    }

    .section {
        margin-bottom: 70px;
    }
}
