:root {
    --primary: #00e5ff; --primary-rgb: 0, 229, 255;
    --primary-glow: rgba(var(--primary-rgb), 0.4);
    --secondary: #8b5cf6;
    --bg: #020617;
    --glass: rgba(15, 23, 42, 0.8);
    --glass-bright: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --size: 20px;
}


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

a {
    transition: color 0.3s ease;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background-color: transparent;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    line-height: 1.6;
}


.bg-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    overflow: hidden;
    background-color: var(--bg);
}

.bg-slide {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1);
    transition: opacity 2.5s ease-in-out, transform 10s ease-out;
}

.bg-slide.active {
    opacity: 1;
    transform: scale(1.05);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.98));
}

.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: conic-gradient(from 180deg at 50% 70%,
        rgba(2, 6, 23, 0.3) 0deg,
        rgba(14, 165, 233, 0.6) 72deg,
        rgba(139, 92, 246, 0.6) 144deg,
        rgba(var(--primary-rgb), 0.6) 216deg,
        rgba(139, 92, 246, 0.6) 288deg,
        rgba(2, 6, 23, 0.3) 1turn);
    mask: radial-gradient(circle at 50% 50%, white 2px, transparent 2.5px) 50% 50% / var(--size) var(--size),
          url("https://assets.codepen.io/605876/noise-mask.png") 256px 50% / 256px 256px;
    mask-composite: intersect;
    -webkit-mask: radial-gradient(circle at 50% 50%, black 2px, transparent 2.5px) 50% 50% / var(--size) var(--size),
                  url("https://assets.codepen.io/605876/noise-mask.png") 256px 50% / 256px 256px;
    -webkit-mask-composite: source-in;
    animation: flicker 20s infinite linear;
    opacity: 1;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-color: transparent;
}

@keyframes flicker {
    to {
        mask-position: 50% 50%, 0 50%;
        -webkit-mask-position: 50% 50%, 0 50%;
    }
}


body.lang-en [lang="vi"] { display: none; }
body.lang-vi [lang="en"] { display: none; }

[lang] {
    animation: fadeIn 0.5s ease;
}

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


.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 20002;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-dot.hidden { opacity: 0; }

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 20001;
    transform: translate3d(-50%, -50%, 0);
    will-change: transform, width, height, border-radius;
    mix-blend-mode: difference;
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                border-radius 0.4s,
                background-color 0.4s,
                border 0.4s;
}

.cursor-follower.sticky {
    background-color: transparent;
    border: 2px solid var(--primary);
    mix-blend-mode: normal;
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.4);
}


.special-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15000;
    opacity: 1;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

.special-overlay.hidden {
    display: none !important;
    pointer-events: none;
}

.card-animator {
    perspective: 1500px;
    opacity: 0;
}

.card-animator.play-enter {
    animation: popUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes popUp {
    0% { opacity: 0; transform: translateY(100px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.special-card {
    width: 360px;
    height: 520px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.8);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    color: white;
    font-family: 'Inter', sans-serif;
}

.special-content {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transform: translateZ(60px);
}

.special-content h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.special-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.card-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.05) 40%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.05) 60%,
        rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.special-card:hover .card-shine {
    transform: translateX(100%);
}

.enter-btn {
    padding: 14px 45px;
    margin-top: 30px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: white;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    transition: 0.3s;
    cursor: pointer;
}

.enter-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.4);
}

.g-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
}

.gb1 { width: 400px; height: 400px; background: var(--primary); top: 10%; left: 20%; animation: floatG 10s infinite ease-in-out; }
.gb2 { width: 350px; height: 350px; background: var(--secondary); bottom: 10%; right: 20%; animation: floatG 12s infinite ease-in-out reverse; }

@keyframes floatG {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, -70px); }
}


.nav-dock {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--glass);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    gap: 10px;
}

.nav-item {
    position: relative;
    height: 48px;
    width: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background 0.3s,
                color 0.3s,
                transform 0.2s;
}

.nav-item.active {
    background: rgba(var(--primary-rgb), 0.15);
    color: #fff;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.nav-item i {
    font-size: 1.2rem;
    min-width: 48px;
    display: flex;
    justify-content: center;
    transition: transform 0.3s;
}

.nav-text {
    position: absolute;
    left: 48px;
    white-space: nowrap;
    opacity: 0;
    font-weight: 700;
    font-size: 0.95rem;
    transform: translateX(10px);
    transition: 0.3s;
}

.nav-item:hover {
    width: 110px;
    background: var(--primary);
    color: #000;
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
}

.nav-item:hover i { transform: translateX(-40px); }
.nav-item:hover .nav-text { opacity: 1; transform: translateX(-15px); }

.nav-brand {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: transform 0.3s, box-shadow 0.3s;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-brand:hover {
    transform: scale(1.15) rotate(5deg);
}

.nav-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 8px;
}

.lang-container {
    perspective: 1000px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.lang-btn {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.lang-btn.flipped { transform: rotateY(180deg); }

.lang-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
    background: white;
}

.lang-face img { width: 100%; height: 100%; object-fit: cover; }
.lang-back { transform: rotateY(180deg); }


.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.persistent-hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-avatar {
    width: 200px;
    height: 200px;
    margin: 0 auto 2.5rem;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    transition: box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar:hover {
    transform: scale(1.05) rotate(2deg);
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
}

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
}

.hero-avatar .flip-front, .hero-avatar .flip-back {
    border: 6px solid rgba(255, 255, 255, 0.1);
}

.nav-brand .flip-front, .nav-brand .flip-back {
    border: 2px solid var(--primary);
}

.hero-avatar:hover .flip-inner, .nav-brand:hover .flip-inner {
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.4);
}

.flip-front {
    background-image: url('https://i.postimg.cc/mg1CD35h/avatar-main.jpg');
    z-index: 2;
    transform: rotateY(0deg);
}

.flip-back {
    background-image: url('https://i.postimg.cc/XvZHnyww/avatar-alt.jpg');
    transform: rotateY(180deg);
}

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

h1 {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    display: flex;
    justify-content: center;
}

.name-char {
    display: inline-block;
    will-change: transform;
    background: linear-gradient(to right, #00e5ff, #8b5cf6, #00e5ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 6s linear infinite;
    transform-origin: bottom center;
}

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

.hero-desc {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.tags {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.tag {
    padding: 10px 28px;
    border-radius: 50px;
    background: var(--glass-bright);
    border: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(10px);
    transition: 0.3s;
}

.tag:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-4px);
    box-shadow: 0 5px 20px rgba(var(--primary-rgb), 0.4);
}

.socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass-bright);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    overflow: visible;
}

.social-btn i {
    text-decoration: none;
}

.social-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    transform: scale(1.2) translateY(-5px);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.4);
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.6;
    font-size: 1.8rem;
    color: white;
    z-index: 10;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-8px);}
}

.content-container {
    width: 100%;
    position: relative;
    padding-bottom: 180px;
    padding-top: 80px;
    min-height: 100vh;
}

.view-section {
    display: none;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


.game-panel {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.5);
    text-align: left;
}

.game-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 30px; height: 30px;
    border-top: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
    pointer-events: none;
}
.game-panel::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 30px; height: 30px;
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    pointer-events: none;
}


.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.dashboard-header h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 1px;
}

.dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
}
.dot.blinking { animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }


.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 4px;
}

.stat-label { color: var(--text-muted); font-weight: 600; letter-spacing: 1px; }
.stat-value { color: #fff; font-weight: 800; text-transform: uppercase; }
.text-primary { color: var(--primary); }

.tech-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(var(--primary-rgb),0.5), transparent);
    margin: 20px 0;
}

.bio-desc p {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.tech-subheading {
    font-family: 'Inter', sans-serif;
    color: var(--primary);
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
}


.vibe-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-pill {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.tech-pill:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.1); transform: translateY(-2px); }


.showcase-title-row {
    text-align: center;
    margin: 60px 0 40px 0;
}

.glitch-text {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
}


.character-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
}
.layout-right { grid-template-columns: 1fr 1fr; }

.char-data-side {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.char-header { margin-bottom: 15px; }
.char-id { font-family: 'Inter', sans-serif; color: var(--primary); font-size: 0.75rem; letter-spacing: 2px; margin-bottom: 3px;}
.char-name { font-size: 2.5rem; font-weight: 900; line-height: 1; margin-bottom: 5px; color: #fff; text-transform: uppercase; }
.char-class { font-family: 'Inter', sans-serif; color: var(--text-muted); font-size: 0.85rem; letter-spacing: 3px; }

.char-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.c-stat {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    text-align: center;
}
.sl { font-family: 'Inter', sans-serif; font-size: 0.65rem; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 2px;}
.sv { font-family: 'Inter', sans-serif; font-size: 0.95rem; color: #fff; font-weight: 800; }

.char-lore p {
    font-size: 1rem; line-height: 1.6; color: #cbd5e1; margin-bottom: 30px;
}


.tech-attributes { display: flex; flex-direction: column; gap: 15px; }
.attr-bar span { font-family: 'Inter', sans-serif; font-size: 0.75rem; color: #cbd5e1; letter-spacing: 1px; display: block; margin-bottom: 5px;}
.bar-track { width: 100%; height: 6px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); position: relative; }
.bar-fill { height: 100%; background: var(--primary); box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.4); }
.wolf-layout .bar-fill { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }


.version-buttons {
    display: flex;
    gap: 10px;
}
.v-btn {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 12px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    transition: 0.3s;
}
.v-btn:hover { background: rgba(255,255,255,0.1); }
.v-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}


.char-visual-side {
    position: relative;
    background: #000;
    border-left: 1px solid rgba(255,255,255,0.1);
}
.layout-right .char-visual-side {
    border-left: none;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.model-viewport {
    width: 100%;
    height: 100%;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.ref-sheet {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.ref-sheet.loaded { opacity: 1; }

.viewport-corners {
    position: absolute;
    top: 20px; left: 20px; right: 20px; bottom: 20px;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    pointer-events: none;
    z-index: 2;
}
.wolf-port .viewport-corners { border-color: rgba(16, 185, 129, 0.3); }

.scanning-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--primary);
    box-shadow: 0 0 20px 2px var(--primary);
    opacity: 0.6;
    animation: scan 4s linear infinite;
    z-index: 3;
    pointer-events: none;
}
@keyframes scan { 0% { top: 0%; } 100% { top: 100%; } }

.ref-overlay-data {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0,0,0,0.7);
    padding: 8px 15px;
    border-left: 3px solid var(--primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--primary);
    z-index: 4;
}
.organic-data {
    border-left-color: #10b981;
    color: #10b981;
}


.character-select-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    perspective: 1500px;
    min-height: 550px;
    background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.08), rgba(0,0,0,0.4));
    overflow: visible;
    contain: layout;
}

.cs-side-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform-style: preserve-3d;
    z-index: 2;
    will-change: transform;
}

.cs-left { text-align: right; align-items: flex-end; }
.cs-right { text-align: left; align-items: flex-start; }

.cs-center-panel {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
    z-index: 5;
    transform-style: preserve-3d;
}

.character-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) translateZ(-150px);
    width: 350px; height: 450px;
    background: radial-gradient(ellipse, rgba(var(--primary-rgb), 0.25) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow { 0% { opacity: 0.6; } 100% { opacity: 1; transform: translate(-50%, -50%) translateZ(-150px) scale(1.1); } }

.cs-character-img {
    height: auto;
    max-height: 600px;
    width: 100%;
    max-width: 500px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(var(--primary-rgb),0.3));
    position: relative;
    top: 5px;
    will-change: transform;
}

.char-stats-stack { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 220px; }
.cs-left .c-stat { text-align: right; border-left: none; border-right: 3px solid var(--primary); transition: background 0.3s }
.cs-left .c-stat:hover { background: rgba(var(--primary-rgb), 0.1); }
.cs-right .tech-attributes { width: 100%; max-width: 250px; }
.cs-tag { position: relative; bottom: auto; left: auto; margin-top: 30px; display: inline-block; border-left-color: var(--primary); color: var(--primary); }

.cs-left h2.char-name { font-size: 2rem; }


.proto-attrs { width: 100%; max-width: none; }
.proto-attrs .bar-track { width: 100%; }


.cs-info-left { text-align: left !important; align-items: flex-start !important; }


.game-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.game-account-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    transition: border-color 0.25s, background 0.25s;
}
.game-account-row:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    background: rgba(var(--primary-rgb), 0.04);
}
.game-account-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    width: 100%;
}
.game-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.game-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.game-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.game-id {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.copy-game-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 4px;
    transition: 0.2s;
    flex-shrink: 0;
}
.copy-game-btn:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}


.pong-easter-row {
    flex-direction: column;
    padding: 0;
    gap: 0;
    cursor: default;
    overflow: hidden;
    border-color: rgba(var(--primary-rgb), 0.2);
}
.pong-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.15);
}
.pong-exe-label {
    font-family: 'Inter', monospace;
    font-size: 0.68rem;
    color: var(--primary);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.pong-cursor {
    animation: blink 0.8s step-end infinite;
    color: var(--primary);
}
.pong-score-txt {
    font-family: 'Inter', monospace;
    font-size: 0.68rem;
    color: rgba(var(--primary-rgb), 0.7);
    letter-spacing: 1px;
}
#pong-canvas {
    display: block;
    width: 100%;
    height: 60px;
}



.proto-quote {
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--primary);
    opacity: 0.8;
    margin-top: 14px;
    letter-spacing: 1px;
}


.card-credit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 3px solid var(--primary);
    padding: 7px 14px;
    letter-spacing: 0.5px;
}
.card-credit i { color: var(--primary); font-size: 0.75rem; }
.credit-link {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}
.credit-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.6);
}



.cs-left { transform: rotateY(15deg) translateZ(-30px); }
.cs-right { transform: rotateY(-15deg) translateZ(-30px); }


.terminal-theme {
    position: relative;
    overflow: hidden;
}

.terminal-theme .crt-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0.4;
    animation: flickerLine 3s infinite;
}

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



@media (max-width: 900px) {
    .character-select-layout { flex-direction: column; min-height: auto; padding: 10px 0; }
    .cs-center-panel { order: -1; min-height: 220px; margin-bottom: 0; }
    .cs-side-panel { padding: 10px; align-items: center; text-align: center; transform: none !important; width: 100%; box-sizing: border-box; }
    
    .char-stats-stack { flex-direction: row; justify-content: space-between; max-width: 100%; width: 100%; gap: 5px; margin-bottom: 5px; }
    .cs-left .c-stat, .cs-right .c-stat { text-align: center; border: 1px solid rgba(255,255,255,0.2) !important; flex: 1; padding: 4px; }
    
    .cs-right .tech-attributes, .cs-left .tech-attributes { max-width: 100%; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 5px; }
    
    .cs-character-img { top: 0; max-height: 250px; }
    .char-header h2.char-name { font-size: 1.5rem; margin-bottom: 2px; }
    .char-lore { display: none; } /* Completely hide lore on mobile */
    .char-class { margin-bottom: 5px; }
    .version-selector-container { margin: 10px auto 0 !important; text-align: center !important; }
    .version-buttons { justify-content: center !important; }
    .cs-tag { margin-top: 10px; padding: 5px 10px; font-size: 0.7rem; }
    .pong-easter-row { display: none; } /* Hide ping pong to improve performance */

    .dashboard-grid, .character-showcase { grid-template-columns: 1fr; }
    .layout-right { display: flex; flex-direction: column-reverse; }
    .char-visual-side { border: none !important; border-top: 1px solid rgba(255,255,255,0.1) !important; min-height: 400px; }
    .char-stats-grid { grid-template-columns: 1fr; }
}


.gallery-grid {
    column-count: 3;
    column-gap: 2rem;
    width: 100%;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.gallery-tab-btn {
    padding: 12px 30px;
    border-radius: 50px;
    background: var(--glass-bright);
    border: 1px solid var(--border);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(15px);
}

.gallery-tab-btn:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-4px);
    box-shadow: 0 5px 20px rgba(var(--primary-rgb), 0.4);
}

.gallery-tab-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.4);
}

.art-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    background: #0f172a;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    transition: 0.5s transform cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.art-card img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.art-card img.loaded {
    opacity: 1;
}

.art-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.art-card:hover img { transform: scale(1.1); }

.art-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 16px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: none;
    z-index: 2;
    color: #fff;
}


.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 40px;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: 0.4s;
    transform-origin: bottom;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(255,255,255,0.04);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7);
}

.project-card:hover::before { transform: scaleY(1); }

.project-title { font-size: 1.8rem; margin-bottom: 15px; color: white; font-weight: 800; }
.project-desc { color: #cbd5e1; font-size: 1.05rem; margin-bottom: 30px; line-height: 1.8; }
.project-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    background: var(--primary);
    color: #000;
    font-weight: 800;
    font-size: 0.95rem;
    transition: 0.3s;
    margin-top: auto;
}


.namecard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 50px;
    perspective: 1500px;
    max-width: 1000px;
    margin: 0 auto;
}

.card-scene { width: 100%; height: 220px; perspective: 1500px; }
.card-item {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.card-item.is-flipped { transform: rotateY(180deg); }

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.card-front, .card-back { background: transparent; }
.card-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    -webkit-user-drag: none;
}

.card-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    color: white;
    transform: translateY(15px);
    opacity: 0;
    transition: 0.4s;
}

.card-item:hover .card-info-overlay { transform: translateY(0); opacity: 1; }

.card-back {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary);
}

.card-back-content { text-align: center; padding: 30px; }
.card-back-content h3 { color: var(--primary); margin-bottom: 12px; font-size: 1.5rem; }
.card-back-content p { font-size: 1.1rem; color: #fff; margin: 8px 0; }
.card-back-content i { width: 25px; color: var(--primary); }


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.98);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(20px);
}

.modal.active { opacity: 1; pointer-events: all; }

.modal-loader {
    position: absolute;
    font-size: 3rem;
    color: var(--primary);
    display: none;
    z-index: 10001;
}

.modal.loading .modal-loader { display: block; }

.modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
}

.modal.active img.ready {
    transform: scale(1);
    opacity: 1;
}


h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


@media (max-width: 1024px) {
    .gallery-grid { column-count: 2; }
}

@media (max-width: 768px) {
    h1 { font-size: 4.5rem; }
    h2 { font-size: 2.2rem; }
    .bubble-container { flex-direction: column; }
    .gallery-grid { column-count: 1; }
    .nav-dock { padding: 8px; bottom: 25px; }
    .nav-item:hover { width: 48px; transform: none; box-shadow: none; background: rgba(255, 255, 255, 0.03); }
    .nav-item:hover i { transform: none; }
    .nav-item.active { background: rgba(var(--primary-rgb), 0.15); }
    .nav-text { display: none; }
    .special-card { width: 90vw; }
}

@media (pointer: coarse), (max-width: 768px) {
    /* Restore default system cursor on touch devices */
    *, a, button { 
        cursor: auto !important; 
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
    }
    button { cursor: pointer !important; }

    /* Hide mouse-only UI elements */
    .cursor-dot,
    .cursor-follower,
    #particle-canvas { display: none !important; }
}


body.fuve-edition {
    --primary: #6bc8bc;
    --primary-rgb: 107, 200, 188;
    --secondary: #d589a1;
    --bg: #0f161c;
    --glass: rgba(15, 22, 28, 0.85);
}


.theme-switcher-container { position: fixed; top: 30px; right: 30px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; }
.theme-toggle-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--glass); border: 1px solid var(--border); color: var(--text); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: 0.3s; backdrop-filter: blur(15px); }
.theme-toggle-btn:hover { background: var(--primary); color: #000; box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4); transform: scale(1.1); }
.theme-menu { margin-top: 15px; background: rgba(15, 23, 42, 0.9); border: 1px solid var(--border); border-radius: 15px; padding: 10px; display: flex; flex-direction: column; gap: 8px; opacity: 0; pointer-events: none; transform: translateY(-10px) scale(0.95); transform-origin: top right; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); backdrop-filter: blur(20px); }
.theme-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.t-btn { background: transparent; color: var(--text); padding: 10px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-align: left; transition: 0.3s; white-space: nowrap; }
.t-btn:hover { background: rgba(255,255,255,0.1); }
.t-btn.active { background: rgba(0,0,0,0.5); border-color: var(--primary); color: var(--primary); box-shadow: inset 0 0 10px rgba(var(--primary-rgb), 0.4); }


body.hypno-mode {
    --primary: #ff003c;
    --primary-rgb: 255, 0, 60;
    --secondary: #d900ff;
    --bg: #050002;
    --text: #ffb3cc;
    --text-muted: #802b41;
    --glass: rgba(10, 0, 5, 0.9);
    --border: rgba(255, 0, 60, 0.3);
}
body.hypno-mode .bg-slideshow {
    filter: hue-rotate(320deg) saturate(2.5) brightness(0.4) contrast(1.8);
    background-color: #000;
}
body.hypno-mode .noise-bg {
    background: conic-gradient(from 0deg at 50% 50%, #ff003c 0deg, #d900ff 90deg, #ff003c 180deg, #d900ff 270deg, #ff003c 360deg);
    animation: hypno-spin 4s infinite linear;
    mix-blend-mode: screen;
    opacity: 0.2;
}
body.hypno-mode .bg-overlay {
    background: radial-gradient(circle at center, rgba(30, 0, 10, 0.5), rgba(5, 0, 2, 0.98));
}
@keyframes hypno-spin {
    0%   { transform: scale(1.5) rotate(0deg); }
    100% { transform: scale(1.5) rotate(360deg); }
}
body.hypno-mode h1,
body.hypno-mode .project-title,
body.hypno-mode .char-name {
    text-shadow: 0 0 10px rgba(255,0,60,0.8), 0 0 30px rgba(217,0,255,0.5);
    color: #ff3366 !important;
}
body.hypno-mode .glitch-text::before,
body.hypno-mode .glitch-text::after { color: #ff3366; }
body.hypno-mode .cs-character-img {
    filter: contrast(1.1) saturate(1.3) drop-shadow(0 0 20px rgba(255,0,60,0.5));
}
body.hypno-mode .cursor-dot {
    background: #ff003c;
    box-shadow: 0 0 15px #ff003c, 0 0 30px #ff003c;
}
body.hypno-mode .cursor-follower {
    border-color: #ff003c;
    background: rgba(255,0,60,0.08);
}
body.hypno-mode .nav-dock {
    border-color: rgba(255,0,60,0.4);
    background: rgba(10,0,5,0.8);
}
body.hypno-mode .hero-name-accent { color: #ff003c; }
body.hypno-mode .tag, body.hypno-mode .project-btn {
    background: #ff003c;
    color: #fff;
}
.hypno-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #ff003c;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    animation: hypno-flash-anim 1.4s cubic-bezier(0.1, 1, 0.1, 1) forwards;
}
@keyframes hypno-flash-anim {
    0%   { opacity: 1; filter: saturate(5) contrast(4); }
    10%  { opacity: 0.2; filter: invert(1); }
    30%  { opacity: 0.8; filter: none; }
    60%  { opacity: 0.3; }
    100% { opacity: 0; }
}
