/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

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

/* Cosmic Background */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a0a1a 100%);
    z-index: -2;
    animation: cosmicShift 20s ease-in-out infinite;
}

@keyframes cosmicShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(1deg); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ffffff, #ffffff, #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.logo-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    margin-top: -5px;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: #4ecdc4;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e23e07, #f83d09);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ffffff, #ffffff, #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-style: italic;
}

.cta-button {
    position: relative;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.button-glow {
    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 ease;
}

.cta-button:hover .button-glow {
    left: 100%;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.energy-orb {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 255, 254, 0.8) 0%, rgba(255, 247, 247, 0.4) 50%, transparent 70%);
    animation: energyPulse 3s ease-in-out infinite;
    position: relative;
}

.energy-orb::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #fff5f5, #f1fdfc, #f7feff, #fcfffe, #f8eaea);
    animation: energyRotate 8s linear infinite;
    z-index: -1;
}

@keyframes energyPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes energyRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fd642c;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.floating-particles::after {
    top: 70%;
    right: 15%;
    animation-delay: -4s;
    background: #ffcb30;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.5; }
}

/* Section Titles */
.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #ffffff, #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, #ffffff);
    border-radius: 2px;
}

/* Factions Section */
.factions {
    padding: 6rem 0;
    position: relative;
}

.factions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faction-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.faction-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.faction-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    pointer-events: none;
}

.faction-card:hover .faction-glow {
    opacity: 1;
}

.akamine-glow {
    box-shadow: 0 0 50px rgba(255, 107, 107, 0.3);
    border: 1px solid rgba(255, 107, 107, 0.5);
}

.alkyne-glow {
    box-shadow: 0 0 50px rgba(147, 51, 234, 0.3);
    border: 1px solid rgba(147, 51, 234, 0.5);
}

.sirutov-glow {
    box-shadow: 0 0 50px rgba(255, 193, 7, 0.3);
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.faction-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.faction-symbol {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.faction-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.faction-color {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 300;
}

.akamine .faction-name,
.akamine .faction-color {
    color: #ff6b6b;
}

.alkyne .faction-name,
.alkyne .faction-color {
    color: #9333ea;
}

.sirutov .faction-name,
.sirutov .faction-color {
    color: #ffc107;
}

.faction-description {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.faction-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.stat-label {
    font-weight: 600;
    min-width: 80px;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.akamine .stat-fill {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
}

.alkyne .stat-fill {
    background: linear-gradient(90deg, #9333ea, #a855f7);
}

.sirutov .stat-fill {
    background: linear-gradient(90deg, #ffc107, #ffd54f);
}

/* Characters Section */
.characters {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.character-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.character-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    position: relative;
    aspect-ratio: 3/4;
}

.character-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.character-image {
    position: relative;
    height: 70%;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.character-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 900;
    color: white;
    position: relative;
    background-size: cover;
    background-position: center;
}

.character-placeholder::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.akamine-char {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
}

.alkyne-char {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
}

.sirutov-char {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    color: #333;
}

.character-info {
    padding: 1rem;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.character-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #ffffff;
}

.character-faction {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    opacity: 0.8;
}

.akamine-text { color: #ff6b6b; }
.alkyne-text { color: #9333ea; }
.sirutov-text { color: #ffc107; }

.character-rank {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* Character Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(40, 40, 40, 0.95));
    border-radius: 20px;
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.modal-character-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    font-weight: 900;
    color: white;
    position: relative;
}

.modal-character-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-character-name {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.modal-character-faction {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-character-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

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

.stat-group {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-group h4 {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #4ecdc4;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    font-weight: 700;
    color: #ffffff;
}

.character-abilities {
    margin-top: 1.5rem;
}

.character-abilities h4 {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #4ecdc4;
}

.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ability {
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.ability:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.ability-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.ability-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a0a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(78, 205, 196, 0.8)); }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.8) 0%, rgba(78, 205, 196, 0.2) 70%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    transform: scale(2);
    background: radial-gradient(circle, rgba(255, 107, 107, 0.8) 0%, rgba(255, 107, 107, 0.2) 70%, transparent 100%);
}

body {
    cursor: none;
}

/* World Section */
.world {
    padding: 6rem 0;
}

.world-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.world-feature {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.world-feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

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

.world-feature h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #4ecdc4;
}

.world-feature p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.9);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .factions-grid {
        grid-template-columns: 1fr;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .faction-card,
    .character-card {
        padding: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff8e8e, #6ee7db);
}