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

body {
    width: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 50%, #0d0221 100%);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* ── Background ────────────────────────────────────────────────────────────── */
.background-container {
    display: none;
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.background-container > * { position: absolute; }

.stars { width: 100%; height: 100%; }

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 2px; height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow:
        10% 20% 0 0 white, 15% 80% 0 0 lightblue, 50% 50% 0 0 white,
        80% 10% 0 0 rgb(255,200,100), 25% 40% 0 0 white, 60% 70% 0 0 lightblue,
        90% 60% 0 0 white, 35% 90% 0 0 rgb(255,200,100), 70% 30% 0 0 lightblue;
    animation: twinkle 3s infinite, floatY 20s infinite ease-in-out;
}
.stars::after { animation-delay: -10s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 1; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-20px); }
}

/* Meteors */
.meteors { width: 100%; height: 100%; }
.meteors::before, .meteors::after {
    content: '';
    position: absolute;
    width: 2px; height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(100,200,255,.8), transparent);
    animation: meteor 2s infinite linear;
}
.meteors::before { top: -100px; left: 20%; animation-delay: 0s; }
.meteors::after  { top: -100px; left: 80%; animation-delay: 1s; }

@keyframes meteor {
    0%   { transform: translateY(-100px) translateX(0);    opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(100vh)  translateX(100px); opacity: 0; }
}

/* Orbs */
.floating-orbs { pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .15; }
.orb-1 { width:400px; height:400px; background: radial-gradient(circle,rgba(100,200,255,.8),transparent); top:-100px; right:5%; animation: floatOrb1 15s ease-in-out infinite; }
.orb-2 { width:350px; height:350px; background: radial-gradient(circle,rgba(255,100,200,.8),transparent); bottom:-100px; left:5%; animation: floatOrb2 18s ease-in-out infinite; }
.orb-3 { width:300px; height:300px; background: radial-gradient(circle,rgba(100,255,200,.8),transparent); top:30%; left:-50px; animation: floatOrb3 20s ease-in-out infinite; }
.orb-4 { width:380px; height:380px; background: radial-gradient(circle,rgba(255,200,100,.8),transparent); bottom:20%; right:-50px; animation: floatOrb4 17s ease-in-out infinite; }

@keyframes floatOrb1 { 0%,100%{transform:translate(0,0)}  50%{transform:translate(-80px,80px)} }
@keyframes floatOrb2 { 0%,100%{transform:translate(0,0)}  50%{transform:translate(80px,-80px)} }
@keyframes floatOrb3 { 0%,100%{transform:translate(0,0)}  50%{transform:translate(80px,80px)} }
@keyframes floatOrb4 { 0%,100%{transform:translate(0,0)}  50%{transform:translate(-80px,-80px)} }

/* ── Hex side panels ───────────────────────────────────────────────────────── */
.hexagon-pattern-left,
.hexagon-pattern-right {
    position: fixed; top: 0;
    width: 200px; height: 200vh;
    pointer-events: none; z-index: 1; overflow: hidden;
}

.hexagon-pattern-left {
    left: 0;
    background-image:
        radial-gradient(ellipse at 0% 50%, transparent 50%, rgba(10,14,39,1) 100%),
        repeating-linear-gradient(0deg,  rgba(100,200,255,.15) 0px, rgba(100,200,255,.25) 1px, transparent 1px, transparent 52px),
        repeating-linear-gradient(60deg, rgba(100,200,255,.15) 0px, rgba(100,200,255,.25) 1px, transparent 1px, transparent 52px),
        repeating-linear-gradient(120deg,rgba(100,200,255,.15) 0px, rgba(100,200,255,.25) 1px, transparent 1px, transparent 52px);
    background-size: 100% 100%, 90px 156px, 90px 156px, 90px 156px;
    background-position: 0 0, 0 0, 0 0, 45px 78px;
    animation: hexScroll1 20s linear infinite;
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,.3) 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,.3) 80%, transparent 100%);
}

.hexagon-pattern-right {
    right: 0;
    background-image:
        radial-gradient(ellipse at 100% 50%, transparent 50%, rgba(10,14,39,1) 100%),
        repeating-linear-gradient(0deg,  rgba(100,200,255,.15) 0px, rgba(100,200,255,.25) 1px, transparent 1px, transparent 52px),
        repeating-linear-gradient(60deg, rgba(100,200,255,.15) 0px, rgba(100,200,255,.25) 1px, transparent 1px, transparent 52px),
        repeating-linear-gradient(120deg,rgba(100,200,255,.15) 0px, rgba(100,200,255,.25) 1px, transparent 1px, transparent 52px);
    background-size: 100% 100%, 90px 156px, 90px 156px, 90px 156px;
    background-position: 0 0, 0 0, 0 0, 45px 78px;
    animation: hexScroll2 20s linear infinite;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,.3) 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,.3) 80%, transparent 100%);
}

@keyframes hexScroll1 {
    0%   { background-position: 0 0, 0 0,    0 0,    45px 78px; }
    100% { background-position: 0 0, 0 156px,0 156px,45px 234px; }
}
@keyframes hexScroll2 {
    0%   { background-position: 0 0, 0 0,     0 0,     45px 78px; }
    100% { background-position: 0 0, 0 -156px,0 -156px,45px -78px; }
}

/* ── Keyframes ─────────────────────────────────────────────────────────────── */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-left {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes gradient-animate {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes scale-in {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100,255,160,.6); }
    50%       { box-shadow: 0 0 0 5px rgba(100,255,160,0); }
}
@keyframes pulse-number {
    0%, 100% { opacity: 1; }
    50%       { opacity: .7; }
}
@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
    position: absolute;
    top: 20px; left: 20px;
    z-index: 100;
    background: transparent;
    padding: 0;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 3rem;
}
.nav-brand {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    background: linear-gradient(135deg, #64c8ff, #ff64c8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 3px;
    animation: fade-in-left .8s ease-out;
}

/* ── Nav links ─────────────────────────────────────────────────────────────── */
.nav-link {
    color: #a8d8ff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: .5px;
    transition: all .3s ease;
    position: relative;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(135deg, #64c8ff, #ff64c8);
    transition: width .3s ease;
}
.nav-link:hover           { color: #64c8ff; transform: scale(1.05); }
.nav-link:hover::after    { width: 100%; }
.nav-link.active          { color: #ff64c8; }
.nav-link.active::after   { width: 100%; background: #ff64c8; }

/* ── Section ───────────────────────────────────────────────────────────────── */
.section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 80px 20px 40px;
    animation: fade-in-up .5s ease-out;
}
.section-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#home-section .section-content { min-height: 100vh; justify-content: center; }
#home-section .hero-banner      { margin: 0 auto; }

.hero-banner,
.games-section,
.about-content {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #64c8ff, #ff64c8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    text-align: center;
}
.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #8ab4d8;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

/* ── Hero Banner ───────────────────────────────────────────────────────────── */
.hero-banner {
    text-align: center;
    padding: 80px 20px 60px;
    animation: fade-in-up .7s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    margin: 15vh auto 60px;
}
.hero-banner .section-title    { font-size: clamp(3rem, 10vw, 5rem); margin-bottom: 15px; }
.hero-banner .section-subtitle { font-size: clamp(1.2rem, 3vw, 1.8rem); margin-bottom: 40px; }

/* ── Persistent Nav ────────────────────────────────────────────────────────── */
.persistent-nav {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}
.hero-nav {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    background: rgba(10,14,39,.9);
    backdrop-filter: blur(10px);
    padding: 14px 28px;
    border-radius: 50px;
    border: 1px solid rgba(100,200,255,.2);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    animation: fade-in-up .8s ease-out;
}

/* ── About cards ───────────────────────────────────────────────────────────── */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 40px;
    justify-content: center;
    justify-items: center;
}
.about-card {
    background: rgba(10,14,39,.8);
    border: 1px solid rgba(100,200,255,.2);
    border-radius: 12px;
    padding: 26px;
    transition: all .3s ease;
    animation: fade-in-up 1s ease-out backwards;
    max-width: 520px;
    width: 100%;
}
.about-card:nth-child(1) { animation-delay: 0s; }
.about-card:nth-child(2) { animation-delay: .1s; }
.about-card:nth-child(3) { animation-delay: .2s; }
.about-card:nth-child(4) { animation-delay: .3s; }

.about-card:hover {
    background: rgba(15,20,50,.9);
    border-color: rgba(100,200,255,.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100,200,255,.15);
}
.about-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #64c8ff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-icon { color: #64c8ff; flex-shrink: 0; }

.about-card p { color: #a8d8ff; line-height: 1.7; }

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.skill-badge {
    background: rgba(100,200,255,.1);
    border: 1px solid rgba(100,200,255,.2);
    border-radius: 20px;
    padding: 6px 14px;
    color: #64c8ff;
    font-size: .85rem;
    font-weight: 500;
    transition: all .3s ease;
}
.skill-badge:hover {
    background: rgba(100,200,255,.2);
    border-color: rgba(100,200,255,.4);
}

.contact-social { display: flex; flex-direction: column; gap: 12px; }
.contact-social p { color: #a8d8ff; display: flex; align-items: center; gap: 8px; }
.contact-social strong { color: #64c8ff; }
.inline-icon { color: #7289da; flex-shrink: 0; }

/* ── Category Tabs ─────────────────────────────────────────────────────────── */
.games-section { position: relative; z-index: 10; padding: 20px 0; width: 100%; }

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.category-tab {
    background: rgba(10,14,39,.8);
    border: 1px solid rgba(100,200,255,.2);
    color: #a8d8ff;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s ease;
    outline: none;
    letter-spacing: .5px;
    font-family: inherit;
}
.category-tab:hover {
    background: rgba(15,20,50,.9);
    border-color: rgba(100,200,255,.4);
    color: #64c8ff;
    transform: translateY(-2px);
}
.category-tab.active {
    background: linear-gradient(135deg, rgba(100,200,255,.2), rgba(255,100,200,.2));
    border-color: #64c8ff;
    color: #fff;
    box-shadow: 0 4px 15px rgba(100,200,255,.3);
}

/* ── Games Grid ────────────────────────────────────────────────────────────── */
.games-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 380px));
    gap: 28px;
    animation: fade-in-up 1.4s ease-out;
    justify-content: center;
    justify-items: center;
}

@media (max-width: 1100px) {
    .games-container { grid-template-columns: repeat(2, minmax(280px, 400px)); }
}
@media (max-width: 700px) {
    .games-container { grid-template-columns: 1fr; }
    .game-card       { max-width: 100%; }
}

/* ── Game Card ─────────────────────────────────────────────────────────────── */
.game-card {
    position: relative;
    background: rgba(10,14,39,.8);
    border: 1px solid rgba(100,200,255,.15);
    border-radius: 12px;
    overflow: hidden;
    cursor: default;
    transition: all .4s cubic-bezier(.34,1.56,.64,1);
    animation: scale-in .6s ease-out backwards;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 380px;
}
.game-card:hover {
    background: rgba(15,20,55,.95);
    border-color: rgba(100,200,255,.35);
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(100,200,255,.15);
}

/* Link badge (top-right) */
.card-link-badge {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 10;
    background: rgba(10,14,39,.85);
    border: 1px solid rgba(100,200,255,.3);
    border-radius: 6px;
    padding: 5px 7px;
    color: #64c8ff;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    text-decoration: none;
}
.card-link-badge svg { display: block; }
.game-card:hover .card-link-badge { opacity: 1; }
.card-link-badge:hover { transform: scale(1.1); background: rgba(100,200,255,.15); }

/* Image area */
.game-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(100,200,255,.07), rgba(255,100,200,.07));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background .4s ease;
}
.game-card:hover .game-image {
    background: linear-gradient(135deg, rgba(100,200,255,.13), rgba(255,100,200,.13));
}
.game-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.game-card:hover .game-image img { transform: scale(1.05); }

.game-image.collab-media {
    border-radius: 50%;
    padding: 16px;
    margin: 16px auto;
    width: calc(100% - 40px);
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(100,200,255,.12), rgba(255,100,200,.12));
}
.game-image img.collaboration-image {
    border-radius: 50%;
    border: 2px solid rgba(100,200,255,.3);
    transition: border-color .3s ease, box-shadow .3s ease;
}
.game-card:hover .game-image img.collaboration-image {
    transform: none;
    border-color: rgba(100,200,255,.6);
    box-shadow: 0 0 20px rgba(100,200,255,.35);
}

.game-image video {
    width: 100%; height: 100%;
    object-fit: cover;
    cursor: default;
}
.media-placeholder { color: rgba(100,200,255,.35); }
.media-placeholder svg { display: block; }

/* Roblox thumbnail loading shimmer */
.thumb-loading {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: rgba(100,200,255,.04);
}
.thumb-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(100,200,255,.08) 40%,
        rgba(100,200,255,.15) 50%,
        rgba(100,200,255,.08) 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite linear;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Card body */
.game-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.game-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    transition: color .3s ease;
}
.game-card:hover .game-name { color: #64c8ff; }

.game-description {
    font-size: .9rem;
    color: #8ab4d8;
    line-height: 1.55;
    margin-bottom: 14px;
    max-height: 3.1em;
    overflow: hidden;
    position: relative;
    padding-right: 1em;
    flex-grow: 1;
    transition: max-height .35s ease, opacity .35s ease;
    opacity: .85;
}
.game-card:hover .game-description { max-height: 12em; opacity: 1; }
.game-description.is-truncated::after {
    content: '...';
    position: absolute;
    right: 0; bottom: 0;
    color: #8ab4d8;
    padding-left: 6px;
    background: linear-gradient(to right, rgba(10,14,39,0), rgba(10,14,39,.9) 60%);
}
.game-card:hover .game-description.is-truncated::after { opacity: 0; }

/* ── Game Stats ────────────────────────────────────────────────────────────── */
.game-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(100,200,255,.1);
    margin-top: auto;
    width: 100%;
    flex-wrap: wrap;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 7px;
}
.stat-icon {
    display: flex;
    align-items: center;
    color: #64c8ff;
    flex-shrink: 0;
    opacity: .8;
}
.stat-icon svg { display: block; }

.stat-label {
    font-size: .7rem;
    color: #649fc4;
    text-transform: uppercase;
    letter-spacing: .8px;
    line-height: 1.2;
}
.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #64c8ff;
    line-height: 1.2;
    animation: pulse-number 3s ease-in-out infinite;
}

/* Live dot */
.live-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #64ffa0;
    flex-shrink: 0;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
    animation: fade-in-up 1s ease-out;
}
.empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: rgba(100,200,255,.35);
    animation: floatAnim 3s ease-in-out infinite;
}
.empty-text { font-size: 1.2rem; color: #8ab4d8; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
    background: rgba(5,7,15,.95);
    border-top: 1px solid rgba(100,200,255,.12);
    padding: 40px 20px 20px;
    margin-top: 80px;
    position: relative;
    z-index: 10;
}
.footer-content { max-width: 1200px; margin: 0 auto; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(100,200,255,.08);
    flex-wrap: wrap;
}
.footer-link {
    color: #a8d8ff;
    text-decoration: none;
    font-size: .95rem;
    transition: color .3s ease;
    position: relative;
}
.footer-link:hover { color: #64c8ff; }
.footer-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(135deg, #64c8ff, #ff64c8);
    transition: width .3s ease;
}
.footer-link:hover::after { width: 100%; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.language-dropdown {
    background: rgba(10,14,39,.8);
    border: 1px solid rgba(100,200,255,.2);
    border-radius: 6px;
    color: #a8d8ff;
    padding: 9px 14px;
    font-size: .9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all .3s ease;
    outline: none;
}
.language-dropdown:hover  { border-color: rgba(100,200,255,.4); }
.language-dropdown:focus  { border-color: #64c8ff; }
.language-dropdown option { background: rgba(10,14,39,1); color: #a8d8ff; }

.footer-copyright { flex: 1; text-align: right; }
.footer-copyright p { color: #8ab4d8; font-size: .85rem; margin: 0; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .section          { padding: 60px 15px 30px; min-height: auto; }
    .about-content    { grid-template-columns: 1fr; gap: 20px; }
    .footer-bottom    { flex-direction: column; text-align: center; }
    .footer-copyright { text-align: center; }
    .footer-links     { gap: 1.5rem; }
    .category-tabs    { gap: 8px; margin-bottom: 28px; }
    .hero-banner      { padding: 40px 20px; }
    .hero-banner .section-title { font-size: 2.5rem; }
}

@media (max-width: 480px) {
    .nav-brand { font-size: 1.5rem; letter-spacing: 1px; }
    .section   { padding: 50px 10px 20px; }
    .hero-banner      { margin: 15vh auto 60px; padding: 60px 20px 40px; }
    .hero-banner .section-title { font-size: 2rem; }
    .games-container  { grid-template-columns: 1fr; }
    .footer           { padding: 30px 15px 15px; }
    .footer-links     { gap: 1rem; }
}
