:root {
    --space-dark: #06080f;
    --space-mid: #0a1025;
    --nebula: #6c5ce7;
    --nebula-light: #8b7cf7;
    --aurora: #00cec9;
    --starlight: #fdcb6e;
    --nebula-glow: rgba(108, 92, 231, 0.3);
    --aurora-glow: rgba(0, 206, 201, 0.3);
    --glass-bg: rgba(8, 12, 28, 0.9);
    --glass-border: rgba(108, 92, 231, 0.2);
    --font-display: 'Cinzel', serif;
    --font-body: 'Source Sans 3', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--space-dark);
    color: #e6e6e6;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

body.mobile-scroll-active {
    overflow-x: auto;
    overflow-y: hidden;
}

#introCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 45;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-flash {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.8) 0%, rgba(108, 92, 231, 0.3) 30%, transparent 70%);
    opacity: 0;
    transform: scale(0.3);
}

.intro-flash.active {
    animation: flashExpand 0.6s ease-out forwards;
}

@keyframes flashExpand {
    0% { opacity: 0; transform: scale(0.3); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: scale(6); }
}

.nebula {
    opacity: 0;
    transition: opacity 1.5s ease;
}

.nebula.visible {
    opacity: 1;
}

.center-brand {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.8s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.center-brand.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.orbit-rings {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    transition: opacity 1s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.orbit-rings.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.nav-nodes {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.nav-node {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

.nav-node.burst-in {
    animation: nodeBurst 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes nodeBurst {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0) translate(var(--burst-x), var(--burst-y)); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) translate(calc(var(--burst-x) * 0.3), calc(var(--burst-y) * 0.3)); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) translate(0, 0); }
}

.connection-lines {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.connection-lines.visible {
    opacity: 1;
}

.footer {
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.footer.visible {
    opacity: 1;
}

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

.nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 25% 20%, rgba(108, 92, 231, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 80%, rgba(0, 206, 201, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(8, 12, 28, 1) 0%, var(--space-dark) 65%);
    pointer-events: none;
    z-index: 2;
    animation: nebulaFlow 25s ease-in-out infinite alternate;
}

@keyframes nebulaFlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.starmap-container {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 10;
}

.starmap-scroll {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

.center-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none;
}

.brand-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.brand-ring-outer {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.15);
    animation: ringRotate 40s linear infinite;
}

.brand-ring-outer::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--nebula);
    border-radius: 50%;
    top: -3px;
    left: 50%;
    box-shadow: 0 0 10px var(--nebula), 0 0 20px rgba(108, 92, 231, 0.5);
}

.brand-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--nebula);
    animation: pulse 4s ease-in-out infinite;
    opacity: 0.4;
}

.brand-pulse::after {
    content: '';
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.15);
    animation: pulse 4s ease-in-out infinite 0.8s;
    opacity: 0.3;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(0.85); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

.brand-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2em;
    text-shadow: 
        0 0 40px rgba(108, 92, 231, 0.6),
        0 0 80px rgba(108, 92, 231, 0.3),
        0 0 120px rgba(108, 92, 231, 0.15);
    animation: titleGlow 5s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 30px rgba(108, 92, 231, 0.6), 0 0 60px rgba(108, 92, 231, 0.3); }
    100% { text-shadow: 0 0 40px rgba(108, 92, 231, 0.8), 0 0 80px rgba(108, 92, 231, 0.5), 0 0 120px rgba(108, 92, 231, 0.25); }
}

.brand-subtitle {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.5em;
    margin-top: 0.6rem;
    text-transform: uppercase;
}

.brand-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(0, 206, 201, 0.6);
    letter-spacing: 0.3em;
    margin-top: 1.2rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease 0.8s forwards;
}

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

.orbit-rings {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
}

.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(108, 92, 231, 0.08);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 { width: 440px; height: 440px; }
.orbit-2 { width: 720px; height: 720px; }
.orbit-3 { width: 1000px; height: 1000px; }


.node-core {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(30, 35, 60, 0.9), rgba(8, 12, 28, 0.95));
    border: 1.5px solid var(--node-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 0 15px rgba(0, 0, 0, 0.5),
        0 0 25px var(--node-glow),
        inset 0 0 15px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
}

.node-core::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--node-color);
    opacity: 0;
    transition: all 0.4s ease;
}

.node-core::after {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--node-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.nav-node:hover .node-core {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 25px rgba(0, 0, 0, 0.5),
        0 0 40px var(--node-glow),
        0 0 70px var(--node-glow),
        inset 0 0 20px rgba(255, 255, 255, 0.08);
    background: radial-gradient(circle at 35% 35%, rgba(40, 45, 75, 0.95), rgba(12, 16, 36, 0.98));
}

.nav-node:hover .node-core::before {
    opacity: 0.4;
    animation: nodePulse 2s ease-in-out infinite;
}

.nav-node:hover .node-core::after {
    opacity: 0.5;
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.25); opacity: 0; }
}

.node-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--node-glow));
    transition: all 0.3s ease;
    line-height: 1;
}

.nav-node:hover .node-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 15px var(--node-glow));
}

.node-label {
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.nav-node:hover .node-label {
    color: #fff;
}

.connection-lines {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.connection-line {
    stroke-width: 1;
    fill: none;
    opacity: 0.2;
    stroke-linecap: round;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: lineDraw 2.5s ease forwards;
}

@keyframes lineDraw {
    to { stroke-dashoffset: 0; }
}

.info-card {
    position: fixed;
    background: rgba(8, 12, 28, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: 14px;
    padding: 1.3rem 2rem;
    text-align: center;
    min-width: 280px;
    max-width: 380px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 30px var(--card-color, rgba(108, 92, 231, 0.1)),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 100;
    left: 50%;
    top: 60%;
    transform: translateX(-50%) translateY(15px);
}

.info-card.active {
    opacity: 1;
    transform: none;
    pointer-events: all;
}

.card-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.card-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 0 12px var(--card-color, rgba(108, 92, 231, 0.4)));
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
    letter-spacing: 0.15em;
}

.card-desc {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--aurora);
    text-decoration: none;
    padding: 0.55rem 1.4rem;
    border-radius: 50px;
    background: rgba(0, 206, 201, 0.08);
    border: 1px solid rgba(0, 206, 201, 0.2);
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.card-link:hover {
    background: rgba(0, 206, 201, 0.15);
    border-color: var(--aurora);
    box-shadow: 0 0 20px rgba(0, 206, 201, 0.2);
    transform: translateY(-1px);
}

.toast-message {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%) translateY(16px);
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(253, 203, 110, 0.35);
    background: rgba(8, 12, 28, 0.95);
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 120;
}

.toast-message.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.footer {
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.15em;
}

@media (max-width: 768px) {
    .starmap-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        scrollbar-width: none;
    }

    .starmap-scroll::-webkit-scrollbar {
        display: none;
    }

    .brand-title {
        font-size: 2.2rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.3em;
    }
    
    .node-core {
        width: 55px;
        height: 55px;
    }
    
    .node-icon {
        font-size: 1.4rem;
    }
    
    .node-label {
        font-size: 0.7rem;
        bottom: -22px;
    }
    
    .info-card {
        min-width: 240px;
        max-width: 85%;
        padding: 1rem 1.5rem;
        bottom: 50px;
    }

    .card-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .toast-message {
        bottom: 18px;
        max-width: calc(100vw - 32px);
        text-align: center;
    }
    
    .brand-ring { width: 160px; height: 160px; }
    .brand-ring-outer { width: 210px; height: 210px; }
}

@media (max-width: 480px) {
    .starmap-scroll {
        overscroll-behavior-x: contain;
    }

    .brand-title {
        font-size: 1.8rem;
    }
    
    .node-core {
        width: 46px;
        height: 46px;
    }
    
    .node-icon {
        font-size: 1.15rem;
    }
    
    .brand-ring { width: 130px; height: 130px; }
    .brand-ring-outer { width: 175px; height: 175px; }
}
