/* ============================================
   AI幻想家 - Main Styles
   Dark Fantasy Theme with Immersive Animations
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0A0612;
    --bg-secondary: #1A0E2E;
    --bg-card: #1E1433;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --accent-gold: #FFD700;
    --accent-orange: #FFA500;
    --text-primary: #F0E6FF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border-color: rgba(139, 92, 246, 0.2);
    --glow-purple: rgba(139, 92, 246, 0.4);
    --glow-pink: rgba(236, 72, 153, 0.3);
    --glow-gold: rgba(255, 215, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 215, 0, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Splash Screen - The First Impression
   ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

/* Splash Background */
.splash-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a0612 0%, #1a0e2e 40%, #2d1b4e 70%, #1a0e2e 100%);
}

.splash-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(232, 160, 191, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 182, 193, 0.08) 0%, transparent 40%);
    animation: splashBgPulse 4s ease-in-out infinite;
}

@keyframes splashBgPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Floating Particles */
.splash-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.splash-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(232, 160, 191, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatParticle 6s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% { 
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    50% { 
        transform: translateY(-100px) translateX(30px) scale(1.5);
    }
}

/* Glow Effects */
.splash-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    animation: glowFloat 5s ease-in-out infinite;
    top: 20%;
    left: 30%;
}

.splash-glow-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 160, 191, 0.25) 0%, transparent 70%);
    filter: blur(50px);
    animation: glowFloat2 6s ease-in-out infinite;
    bottom: 20%;
    right: 25%;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.2); }
}

@keyframes glowFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(1.1); }
}

/* Splash Content */
.splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    animation: splashContentIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Splash Image */
.splash-image-wrapper {
    position: relative;
    width: 280px;
    height: 380px;
    border-radius: 140px 140px 40px 40px;
    overflow: hidden;
    box-shadow: 
        0 0 60px rgba(232, 160, 191, 0.3),
        0 0 120px rgba(139, 92, 246, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: imageBreath 3s ease-in-out infinite;
}

.splash-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: brightness(0.9) contrast(1.1) saturate(1.1);
}

.splash-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        transparent 0%, 
        transparent 60%, 
        rgba(10, 6, 18, 0.4) 100%
    );
    pointer-events: none;
}

@keyframes imageBreath {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 
            0 0 60px rgba(232, 160, 191, 0.3),
            0 0 120px rgba(139, 92, 246, 0.2),
            0 20px 60px rgba(0, 0, 0, 0.5);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 
            0 0 80px rgba(232, 160, 191, 0.4),
            0 0 160px rgba(139, 92, 246, 0.3),
            0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

/* Splash Text */
.splash-text {
    text-align: center;
}

.splash-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 600;
    background: linear-gradient(135deg, #e8a0bf 0%, #8b5cf6 50%, #ffb6c1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: titleShimmer 3s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes titleShimmer {
    0%, 100% { 
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% { 
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

.splash-title {
    background-size: 200% 200%;
}

.splash-subtitle {
    font-size: clamp(14px, 3vw, 18px);
    color: rgba(240, 230, 255, 0.7);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: subtitleFade 2s ease-in-out infinite;
}

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

/* Loader Bar */
.splash-loader {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b5cf6, #e8a0bf, #ffb6c1);
    border-radius: 2px;
    animation: loaderProgress 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

@keyframes loaderProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .splash-silhouette {
        width: 140px;
        height: 180px;
    }
    
    .silhouette-figure {
        width: 90px;
        height: 150px;
    }
    
    .splash-glow {
        width: 250px;
        height: 250px;
    }
    
    .splash-glow-2 {
        width: 200px;
        height: 200px;
    }
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 6, 18, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.nav-logo:hover .logo-img {
    filter: drop-shadow(0 0 10px var(--glow-gold));
    transform: scale(1.05);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    position: relative;
}

.lang-btn {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: var(--accent-purple);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown button {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.lang-dropdown button:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-gold);
}

.btn-login {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-login:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

.btn-register {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    color: var(--bg-primary);
    padding: 0.625rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--glow-gold);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

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

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-heading);
}

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

.online-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Clickable Section Headers */
.clickable-section {
    cursor: pointer;
    transition: var(--transition);
    padding: 1rem;
    border-radius: 16px;
}

.clickable-section:hover {
    background: rgba(139, 92, 246, 0.05);
}

.clickable-section:hover .view-more {
    opacity: 1;
    transform: translateX(0);
}

.view-more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent-purple);
    font-weight: 500;
    opacity: 0.7;
    transform: translateX(-10px);
    transition: var(--transition);
}

/* ============================================
   Filter Tags
   ============================================ */
.filter-tags {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.filter-tag {
    padding: 0.625rem 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tag:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-gold);
    border-color: var(--accent-purple);
}

.filter-tag.active {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-primary);
    border-color: transparent;
    font-weight: 600;
}

/* ============================================
   Characters Section
   ============================================ */
.characters-section {
    position: relative;
    padding: 4rem 2rem 6rem;
    z-index: 1;
}

.characters-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Character Card - Immersive Style */
.character-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    background: var(--bg-card);
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s ease,
                box-shadow 0.4s ease;
}

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

.character-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.character-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 30px var(--glow-gold),
        0 0 60px var(--glow-purple);
    z-index: 10;
}

/* Character Image - Larger than container for parallax movement */
.character-img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center 30%;
    margin: -10%;
    transition: transform 0.3s ease-out;
    transform-origin: center center;
}

/* Video elements - disable CSS animation since video is the animation */
.character-video {
    animation: none !important;
}

.character-card:hover .character-video {
    animation: none !important;
    transform: scale(1) !important;
}

/* 5-second organic character animation - simulates life-like movement */
@keyframes livingPortrait {
    /* 0s - Initial state, character at rest */
    0% {
        transform: scale(1.15) translate(0, 0) rotate(0deg) skew(0deg, 0deg);
        filter: brightness(1) contrast(1) saturate(1) hue-rotate(0deg);
        transform-origin: center center;
    }
    /* 0.3s - Subtle breath in, slight chest expansion */
    6% {
        transform: scale(1.16) translate(0, -0.3%) rotate(0deg) skew(0deg, 0.2deg);
        filter: brightness(1.01) contrast(1.01) saturate(1.02) hue-rotate(0deg);
        transform-origin: center 60%;
    }
    /* 0.8s - Head tilts slightly, eyes shift */
    16% {
        transform: scale(1.17) translate(-0.5%, -0.8%) rotate(-0.8deg) skew(0.1deg, 0deg);
        filter: brightness(1.03) contrast(1.02) saturate(1.03) hue-rotate(1deg);
        transform-origin: 55% 35%;
    }
    /* 1.5s - Character smiles subtly, face brightens */
    30% {
        transform: scale(1.18) translate(0.3%, -1.2%) rotate(0.5deg) skew(-0.1deg, 0.1deg);
        filter: brightness(1.06) contrast(1.04) saturate(1.05) hue-rotate(-1deg);
        transform-origin: 50% 30%;
    }
    /* 2.2s - Body shifts weight, slight hip movement */
    44% {
        transform: scale(1.19) translate(-1%, -0.5%) rotate(-1.2deg) skew(0.2deg, -0.1deg);
        filter: brightness(1.04) contrast(1.03) saturate(1.04) hue-rotate(2deg);
        transform-origin: 45% 55%;
    }
    /* 2.8s - Character looks away briefly, then back */
    56% {
        transform: scale(1.2) translate(0.8%, -1.5%) rotate(1deg) skew(-0.2deg, 0.2deg);
        filter: brightness(1.08) contrast(1.05) saturate(1.06) hue-rotate(-2deg);
        transform-origin: 52% 32%;
    }
    /* 3.5s - Subtle hair flip, shoulder movement */
    70% {
        transform: scale(1.21) translate(-0.5%, -2%) rotate(-0.5deg) skew(0.1deg, -0.2deg);
        filter: brightness(1.1) contrast(1.06) saturate(1.08) hue-rotate(1deg);
        transform-origin: 48% 40%;
    }
    /* 4s - Character leans in slightly, more intimate */
    80% {
        transform: scale(1.22) translate(0.2%, -2.5%) rotate(0.3deg) skew(-0.1deg, 0.1deg);
        filter: brightness(1.12) contrast(1.08) saturate(1.1) hue-rotate(-1deg);
        transform-origin: 50% 35%;
    }
    /* 4.5s - Final micro-adjustment, settling */
    90% {
        transform: scale(1.21) translate(0, -2.2%) rotate(0deg) skew(0deg, 0deg);
        filter: brightness(1.1) contrast(1.07) saturate(1.08) hue-rotate(0deg);
        transform-origin: 50% 38%;
    }
    /* 5s - Final pose, character "alive" and present */
    100% {
        transform: scale(1.2) translate(0, -2%) rotate(0deg) skew(0deg, 0deg);
        filter: brightness(1.08) contrast(1.06) saturate(1.06) hue-rotate(0deg);
        transform-origin: 50% 40%;
    }
}

/* Breathing effect - continuous subtle movement when visible */
.character-card.visible .character-img {
    animation: breathing 4s ease-in-out infinite;
}

/* 5-second living portrait animation on hover */
.character-card:hover .character-img {
    animation: livingPortrait 5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes breathing {
    0%, 100% {
        transform: scale(1.15) translate(0, 0) rotate(0deg);
        filter: brightness(1) contrast(1) saturate(1);
    }
    25% {
        transform: scale(1.155) translate(0, -0.2%) rotate(0.1deg);
        filter: brightness(1.01) contrast(1.01) saturate(1.01);
    }
    50% {
        transform: scale(1.16) translate(0, -0.4%) rotate(0deg);
        filter: brightness(1.02) contrast(1.01) saturate(1.02);
    }
    75% {
        transform: scale(1.155) translate(0, -0.2%) rotate(-0.1deg);
        filter: brightness(1.01) contrast(1.01) saturate(1.01);
    }
}

/* Load More Button */
.btn-load-more {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

/* Card Info Overlay */
.character-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    transition: var(--transition);
}

.character-card:hover .character-info {
    padding-bottom: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.8) 60%, transparent 100%);
}

/* Category Tag */
.character-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Online Status */
.character-status {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #22c55e;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Character Name */
.character-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
    transition: var(--transition);
}

.character-card:hover .character-name {
    text-shadow: 0 0 20px var(--glow-gold);
}

/* Character Description */
.character-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Chat Preview Bubble */
.character-chat {
    position: absolute;
    bottom: 100%;
    left: 1rem;
    right: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--bg-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px 12px 12px 4px;
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.character-card:hover .character-chat {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* CTA Button */
.character-cta {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease 0.1s;
}

.character-card:hover .character-cta {
    opacity: 1;
    transform: translateX(0);
}

.character-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--glow-gold);
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    position: relative;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 14, 46, 0.3) 50%, transparent 100%);
    z-index: 1;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: rgba(30, 20, 51, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Scenarios Section
   ============================================ */
.scenarios-section {
    position: relative;
    padding: 6rem 2rem;
    z-index: 1;
}

.scenarios-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.scenario-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    transition: var(--transition);
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink), var(--accent-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

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

.scenario-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.scenario-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.scenario-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing-section {
    position: relative;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 14, 46, 0.3) 50%, transparent 100%);
    z-index: 1;
}

.pricing-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.pricing-card {
    background: rgba(30, 20, 51, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
}

.pricing-card.featured {
    border-color: var(--accent-gold);
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-primary);
    padding: 0.4rem 1.25rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li::before {
    content: '✓';
    color: var(--accent-gold);
    font-weight: bold;
}

.pricing-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pricing-btn.primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    color: var(--bg-primary);
}

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

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

.pricing-btn.secondary:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    position: relative;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.35rem 0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--accent-gold);
    transform: translateX(4px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 24px 0 0 24px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.modal-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.modal-type {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    font-size: 0.85rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.modal-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tag {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.modal-cta {
    margin-top: auto;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    color: var(--bg-primary);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--glow-gold);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .characters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .features-grid,
    .scenarios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .btn-login {
        display: none;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        border-radius: 24px 24px 0 0;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .character-name {
        font-size: 1rem;
    }
    
    .character-desc {
        font-size: 0.75rem;
    }
    
    .features-grid,
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* RTL Support */
[dir="rtl"] .nav-links {
    direction: rtl;
}

[dir="rtl"] .footer-col a:hover {
    transform: translateX(-4px);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-pink);
}

/* Chat Preview in Modal */
.chat-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
}

.chat-preview-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    opacity: 0;
    animation: chatFadeIn 0.5s ease forwards;
}

.chat-message:nth-child(1) { animation-delay: 0.2s; }
.chat-message:nth-child(2) { animation-delay: 0.8s; }
.chat-message:nth-child(3) { animation-delay: 1.4s; }

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

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-bubble {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    max-width: 80%;
}

.chat-bubble.user {
    background: rgba(232, 160, 191, 0.2);
    border-color: rgba(232, 160, 191, 0.3);
    margin-left: auto;
}

/* Multi-step Modal */
.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
    animation: stepFadeIn 0.4s ease;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.modal-step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--accent-gold);
    width: 24px;
    border-radius: 4px;
}

.step-dot.completed {
    background: var(--accent-green);
}

/* Registration Form in Modal */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-pink));
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .chat-preview {
        padding: 0.75rem;
    }
    
    .chat-avatar {
        width: 28px;
        height: 28px;
    }
    
    .chat-bubble {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-image {
        aspect-ratio: 3/4;
        max-height: 300px;
    }
    
    .modal-name {
        font-size: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Enhanced Mobile First */
@media (max-width: 480px) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-stat {
        min-width: 80px;
    }
    
    .hero-stat-number {
        font-size: 1.5rem;
    }
    
    .hero-stat-label {
        font-size: 0.7rem;
    }
    
    .characters-grid {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .character-card {
        border-radius: 12px;
    }
    
    .character-name {
        font-size: 0.85rem;
    }
    
    .character-desc {
        display: none;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
