/* Root Variables - Futuristic Space Pirate Theme */
:root {
    --primary-dark: #0a0e1a;
    --secondary-dark: #151b2e;
    --tertiary-dark: #1f2937;
    --accent-cyan: #00d9ff;
    --accent-purple: #b794f6;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    /* Type Colors */
    --fire: #ff4500;
    --life: #22c55e;
    --water: #3b82f6;
    --energy: #fbbf24;
    --space: #8b5cf6;
    --sound: #06b6d4;
    --synthetic: #ec4899;
    --body: #f97316;
    --mind: #a855f7;
    --light: #fef08a;
    --dark: #4c1d95;
    --balance: #64748b;
    
    --header-height: 80px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(0, 217, 255, 0.3);
    z-index: 1000;
    transition: all var(--transition-speed);
}

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

.nav-logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color var(--transition-speed);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-cyan);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-cyan);
    border-radius: 3px;
    transition: all var(--transition-speed);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/istar-splash-1.jpg') center center / cover no-repeat;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.7) 0%, rgba(10, 14, 26, 0.85) 100%);
    z-index: 1;
}

.stars-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent);
    background-size: 200% 200%;
    animation: stars 60s linear infinite;
}

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

.nebula-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 217, 255, 0.15), transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(183, 148, 246, 0.15), transparent 50%);
    animation: nebula 20s ease-in-out infinite;
}

@keyframes nebula {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-logo img {
    width: 300px;
    max-width: 80%;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px rgba(0, 217, 255, 0.7));
    animation: float 3s ease-in-out infinite;
}

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

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(183, 148, 246, 0.8)); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--accent-cyan);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-cyan);
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
}

.scroll-indicator span {
    width: 6px;
    height: 12px;
    background: var(--accent-cyan);
    border-radius: 3px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

/* About Section */
.about {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--primary-dark), var(--secondary-dark));
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.title-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    margin: 0 auto;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-top: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.about-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

.about-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.protagonist-showcase {
    position: relative;
    background: url('assets/istar-splash-2.jpg') center center / cover no-repeat;
    border: 2px solid rgba(183, 148, 246, 0.3);
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.protagonist-info {
    position: relative;
    z-index: 1;
}

.protagonist-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.protagonist-info p {
    color: var(--text-primary);
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* GeoDex Section */
.geodex-section {
    padding: 6rem 0;
    background: var(--secondary-dark);
    position: relative;
    overflow: hidden;
}

.geodex-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.geodex-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

/* Animated Rubik's Cube Visual */
.geodex-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.cube-container {
    width: 300px;
    height: 300px;
    position: relative;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(0, 217, 255, 0.5);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    padding: 5px;
    background: rgba(18, 24, 38, 0.8);
    backdrop-filter: blur(10px);
}

.cube-face::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: 
        linear-gradient(90deg, var(--fire) 0%, var(--fire) 11.11%, 
                        var(--life) 11.11%, var(--life) 22.22%,
                        var(--water) 22.22%, var(--water) 33.33%,
                        var(--energy) 33.33%, var(--energy) 44.44%,
                        var(--space) 44.44%, var(--space) 55.55%,
                        var(--sound) 55.55%, var(--sound) 66.66%,
                        var(--synthetic) 66.66%, var(--synthetic) 77.77%,
                        var(--body) 77.77%, var(--body) 88.88%,
                        var(--mind) 88.88%, var(--mind) 100%);
    opacity: 0.3;
    filter: blur(2px);
}

.cube-face.front { transform: translateZ(150px); }
.cube-face.back { transform: translateZ(-150px) rotateY(180deg); }
.cube-face.right { transform: rotateY(90deg) translateZ(150px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(150px); }
.cube-face.top { transform: rotateX(90deg) translateZ(150px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(150px); }

/* GeoDex Info */
.geodex-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.geodex-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.geodex-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    transition: all var(--transition-speed);
}

.feature-item:hover {
    border-color: var(--accent-cyan);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.2);
}

.feature-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.feature-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-geodex {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: 50px;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.btn-geodex:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.5);
}

.btn-geodex .btn-icon {
    font-size: 1.5rem;
    transition: transform var(--transition-speed);
}

.btn-geodex:hover .btn-icon {
    transform: translateX(5px);
}

.filter-panel {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.state-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.state-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.state-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.state-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-color: var(--accent-cyan);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

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

.type-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.type-btn {
    padding: 0.8rem;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.type-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
}

.type-btn.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

.type-badge {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: white;
    text-align: center;
}

.type-badge.fire { background: linear-gradient(135deg, var(--fire), #ff6b35); }
.type-badge.life { background: linear-gradient(135deg, var(--life), #16a34a); }
.type-badge.water { background: linear-gradient(135deg, var(--water), #2563eb); }
.type-badge.energy { background: linear-gradient(135deg, var(--energy), #f59e0b); }
.type-badge.space { background: linear-gradient(135deg, var(--space), #7c3aed); }
.type-badge.sound { background: linear-gradient(135deg, var(--sound), #0891b2); }
.type-badge.synthetic { background: linear-gradient(135deg, var(--synthetic), #db2777); }
.type-badge.body { background: linear-gradient(135deg, var(--body), #ea580c); }
.type-badge.mind { background: linear-gradient(135deg, var(--mind), #9333ea); }
.type-badge.light { background: linear-gradient(135deg, var(--light), #fde047); color: var(--primary-dark); }
.type-badge.dark { background: linear-gradient(135deg, var(--dark), #6b21a8); }
.type-badge.balance { background: linear-gradient(135deg, var(--balance), #475569); }

/* Role Filters */
.role-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.role-btn {
    padding: 0.8rem;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.role-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.1);
}

.role-btn.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

.role-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.role-name {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-reset {
    padding: 0.8rem 2rem;
    background: transparent;
    border: 2px solid var(--accent-purple);
    border-radius: 5px;
    color: var(--accent-purple);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-reset:hover {
    background: var(--accent-purple);
    color: white;
    transform: translateY(-2px);
}

/* Creature Grid */
.creature-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 1 !important;
    visibility: visible !important;
}

.creature-card {
    background: rgba(31, 41, 55, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    --card-glow-color: rgba(0, 217, 255, 0.5);
}

.creature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(183, 148, 246, 0.1));
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.creature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--card-glow-color);
}

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

.creature-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 217, 255, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    z-index: 2;
}

.creature-role-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.4rem;
    border-radius: 50%;
    font-size: 1.2rem;
    z-index: 2;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(0, 217, 255, 0.3);
    transition: all var(--transition-speed);
    cursor: help;
}

.creature-role-icon:hover {
    transform: scale(1.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
}

.creature-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.creature-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 217, 255, 0.3));
    transition: transform var(--transition-speed);
}

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

.creature-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.creature-types {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.creature-type {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 217, 255, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* Infinity Stars Showcase Section */
.stars-showcase {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(26, 20, 52, 0.95) 50%, rgba(10, 14, 26, 0.95) 100%);
    position: relative;
    overflow: hidden;
}

.stars-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(132, 255, 0, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.showcase-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-cyan);
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

/* Evolution Showcase */
.evolution-showcase {
    margin-bottom: 5rem;
}

.evolution-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.evolution-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arrow-icon {
    font-size: 3rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.8);
    animation: pulse 2s infinite;
}

.arrow-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Elements Showcase */
.elements-showcase {
    margin-bottom: 4rem;
}

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

/* Star Cards */
.star-card {
    background: rgba(31, 41, 55, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.star-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.star-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 217, 255, 0.4);
}

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

.star-card.fire {
    border-color: var(--fire);
}

.star-card.fire:hover {
    box-shadow: 0 10px 40px rgba(255, 69, 0, 0.4);
}

.star-card.life {
    border-color: var(--life);
}

.star-card.life:hover {
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.4);
}

.star-card.water {
    border-color: var(--water);
}

.star-card.water:hover {
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.star-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: var(--primary-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.star-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 10px 30px rgba(0, 217, 255, 0.3));
    transition: transform var(--transition-speed);
}

.star-card:hover .star-image {
    transform: scale(1.1);
}

.star-info {
    position: relative;
    z-index: 1;
}

.star-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 217, 255, 0.5);
}

.star-number {
    display: inline-block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.star-type {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.star-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

.showcase-cta {
    text-align: center;
    margin-top: 4rem;
}

/* Responsive Design for Showcase */
@media (max-width: 968px) {
    .evolution-pair {
        flex-direction: column;
        gap: 2rem;
    }
    
    .evolution-arrow {
        transform: rotate(90deg);
    }
    
    .elements-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .star-image {
        width: 150px;
        height: 150px;
    }
    
    .star-name {
        font-size: 1.2rem;
    }
}

/* Galaxy X Section */
.galaxy-x-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--secondary-dark), rgba(10, 14, 26, 0.95));
    position: relative;
    overflow: hidden;
}

.galaxy-x-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Galaxy X two-column layout (map + info) */
.galaxy-x-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

/* Galaxy X star map image container */
.galaxy-x-map {
    position: relative;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.galaxy-x-map:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

.galaxy-x-map img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.9) contrast(1.1);
    transition: filter var(--transition-speed);
}

.galaxy-x-map:hover img {
    filter: brightness(1) contrast(1.15);
}

/* Galaxy X info panel */
.galaxy-x-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.galaxy-x-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Galaxy X 2x2 highlights grid */
.galaxy-x-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.galaxy-x-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    transition: all var(--transition-speed);
}

.galaxy-x-highlight:hover {
    border-color: var(--accent-purple);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.2);
}

.galaxy-x-highlight .highlight-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.galaxy-x-highlight .highlight-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Galaxy X responsive */
@media (max-width: 968px) {
    .galaxy-x-content {
        grid-template-columns: 1fr;
    }

    .galaxy-x-highlights {
        grid-template-columns: 1fr;
    }
}

/* Skills Database Section */
.skills-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--primary-dark), rgba(21, 27, 46, 0.95));
    position: relative;
    overflow: hidden;
}

.skills-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 217, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(183, 148, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.skills-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.skills-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skills-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.skills-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Skills Preview Table */
.skills-preview-table {
    background: rgba(21, 27, 46, 0.8);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.preview-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 217, 255, 0.1);
    border-bottom: 2px solid rgba(0, 217, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-cyan);
}

.preview-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
    transition: background var(--transition-speed);
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-row:hover {
    background: rgba(0, 217, 255, 0.06);
}

.preview-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.preview-name.t2 {
    color: var(--accent-cyan);
}

.preview-name.t1 {
    color: var(--text-primary);
}

/* Element color dots for skill preview */
.preview-el {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
}

.preview-el.fire { background: linear-gradient(135deg, #ff4500, #ff6b35); color: #fff; }
.preview-el.life { background: linear-gradient(135deg, #22c55e, #4ade80); color: #000; }
.preview-el.water { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; }

.preview-combat {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-effect {
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
}

@media (max-width: 768px) {
    .skills-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-features {
        grid-template-columns: 1fr;
    }

    .skills-info h3 {
        font-size: 1.5rem;
    }
}

/* Meet Eon Section */
.meet-eon-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(26, 20, 52, 0.95), var(--primary-dark));
    position: relative;
    overflow: hidden;
}

.meet-eon-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(183, 148, 246, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Meet Eon content wrapper */
.meet-eon-content {
    margin-top: 2rem;
}

/* Meet Eon CTA button inside protagonist showcase */
.meet-eon-section .protagonist-info .btn {
    margin-top: 1.5rem;
}

/* Universe Section */
.universe {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--secondary-dark), var(--primary-dark));
}

/* Characters Section */
.characters-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--primary-dark), var(--secondary-dark));
    position: relative;
    overflow: hidden;
}

.characters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(183, 148, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(0, 217, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.characters-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.character-preview-card {
    background: rgba(31, 41, 55, 0.6);
    border: 2px solid rgba(183, 148, 246, 0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.character-preview-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-purple);
    box-shadow: 0 20px 40px rgba(183, 148, 246, 0.3);
}

.character-preview-portrait {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.character-preview-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.character-preview-card:hover .character-preview-portrait img {
    transform: scale(1.05);
}

.character-preview-info {
    padding: 1.2rem;
    text-align: center;
}

.character-preview-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.character-preview-faction {
    font-size: 0.85rem;
    color: var(--accent-purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.characters-cta {
    text-align: center;
}

@media (max-width: 968px) {
    .characters-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .characters-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

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

.state-card {
    background: rgba(31, 41, 55, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
}

.state-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3);
}

.state-card.natural:hover { border-color: var(--life); }
.state-card.cosmic:hover { border-color: var(--space); }
.state-card.cybernetic:hover { border-color: var(--synthetic); }
.state-card.ethereal:hover { border-color: var(--light); }

.state-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.state-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-cyan);
}

.state-header .state-icon {
    font-size: 2.5rem;
}

.state-types {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.type-tag {
    padding: 0.4rem 0.9rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.type-tag.fire { background: var(--fire); }
.type-tag.life { background: var(--life); }
.type-tag.water { background: var(--water); }
.type-tag.energy { background: var(--energy); }
.type-tag.space { background: var(--space); }
.type-tag.sound { background: var(--sound); }
.type-tag.synthetic { background: var(--synthetic); }
.type-tag.body { background: var(--body); }
.type-tag.mind { background: var(--mind); }
.type-tag.light { background: var(--light); color: var(--primary-dark); }
.type-tag.dark { background: var(--dark); }
.type-tag.balance { background: var(--balance); }

.state-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    border-top: 2px solid rgba(0, 217, 255, 0.3);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 1rem;
}

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

.footer-links h4,
.footer-social h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 50%;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all var(--transition-speed);
}

.social-icon:hover {
    background: var(--accent-cyan);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--secondary-dark);
    border: 2px solid var(--accent-cyan);
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.5);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 217, 255, 0.2);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    color: var(--accent-cyan);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    z-index: 1;
}

.modal-close:hover {
    background: var(--accent-cyan);
    color: var(--primary-dark);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 217, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
}

.modal-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 217, 255, 0.5));
}

.modal-info h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.modal-types {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.modal-stats {
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    color: var(--accent-cyan);
    font-weight: 700;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .type-filters {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .geodex-content {
        grid-template-columns: 1fr;
    }
    
    .geodex-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .state-filters {
        flex-direction: column;
    }
    
    .state-btn {
        min-width: 100%;
    }
    
    .creature-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .states-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
}
