/* ═══════════════════════════════════════════════════════════════ */
/* VIRELION_OS CUBIC POLYNOMIAL TOPOLOGY STYLESHEET v2.0 */
/* ═══════════════════════════════════════════════════════════════ */

/* CSS Variables for Theming */
:root {
    /* Chromatic Palette */
    --cyan: #22d3ee;
    --purple: #a855f7;
    --pink: #ec4899;
    --turquoise: #14b8a6;
    --gold: #f59e0b;
    --orange: #f97316;

    /* Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Glass Effect */
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(56, 189, 248, 0.3);
    --glass-blur: 20px;

    /* Typography */
    --font-playfair: 'Playfair Display', serif;
    --font-eb: 'EB Garamond', serif;
    --font-merriweather: 'Merriweather', serif;
    --font-orbitron: 'Orbitron', sans-serif;
    --font-rajdhani: 'Rajdhani', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-merriweather), 'Courier New', monospace;
    font-weight: 300;
    line-height: 1.6;
}

/* Particle Background */
#particle-field {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}

/* Cursor Cube */
.cursor-cube {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) rotate(45deg);
    transition: transform 0.1s ease-out, opacity 0.2s ease-out;
    opacity: 0;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 50%, var(--pink) 100%);
    box-shadow:
    0 0 10px var(--cyan),
    0 0 20px var(--purple),
    0 0 30px var(--pink);
    mix-blend-mode: screen;
}

@media (min-width: 640px) {
    .cursor-cube {
        opacity: 1;
    }
}

.cursor-cube.active {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.5);
}

/* Chromatic Progress Bar */
.chromatic-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--purple) 100%);
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s ease-out;
    width: 100%;
    box-shadow: 0 0 10px var(--purple);
}

/* Main Container */
.virelion-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    z-index: 1;
}

/* Navigation */
.floating-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    z-index: 100;
    box-shadow:
    0 0 40px rgba(56, 189, 248, 0.15),
    0 0 80px rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item[data-hue="cyan"] {
    --nav-color: var(--cyan);
}

.nav-item[data-hue="purple"] {
    --nav-color: var(--purple);
}

.nav-item[data-hue="pink"] {
    --nav-color: var(--pink);
}

.nav-item[data-hue="turquoise"] {
    --nav-color: var(--turquoise);
}

.nav-item[data-hue="gold"] {
    --nav-color: var(--gold);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px var(--nav-color);
    transform: translateY(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--nav-color), transparent);
    box-shadow: 0 0 30px var(--nav-color);
}

.nav-icon {
    font-size: 16px;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-rajdhani);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Page Sections */
.pages-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.page-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px 20px 60px;
}

.page-section.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-playfair);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-family: var(--font-eb);
    max-width: 600px;
    margin: 0 auto;
}

/* Welcome Page */
.hero-banner {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.banner-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-family: var(--font-playfair);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
}

.virelion-text {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--cyan);
}

.cubicly-text {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    color: var(--text-muted);
    font-weight: 300;
}

/* Cards */
.welcome-card, .dynasty-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow:
    0 0 40px rgba(56, 189, 248, 0.15),
    0 0 80px rgba(168, 85, 247, 0.1),
    inset 0 0 60px rgba(15, 23, 42, 0.5);
    transition: all 0.3s ease;
}

.welcome-card:hover, .dynasty-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow:
    0 0 60px rgba(56, 189, 248, 0.25),
    0 0 100px rgba(168, 85, 247, 0.15),
    inset 0 0 60px rgba(15, 23, 42, 0.5);
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-image {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.6));
    animation: pulse-glow 3s ease-in-out infinite;
}

.card-title {
    font-family: var(--font-playfair);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.description-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.feature-item, .info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-item:hover, .info-card:hover {
    transform: translateY(-4px);
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

.feature-icon, .card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.feature-item h4, .info-card h4 {
    font-family: var(--font-orbitron);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--cyan);
}

.feature-item p, .info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Buttons */
.cta-primary, .connect-button, .analyze-button {
    position: relative;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-orbitron);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.cta-primary:hover, .connect-button:hover, .analyze-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(168, 85, 247, 0.6);
}

.cta-primary:active, .connect-button:active, .analyze-button:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.cta-primary:hover .btn-glow {
    transform: translateX(100%);
}

/* Cubicly 4D Page */
.cubicly-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 768px) {
    .cubicly-container {
        grid-template-columns: 1fr;
    }
}

/* Block Fields */
.block-field {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    min-height: 400px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.block-field:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.3);
}

.block-content {
    position: relative;
    z-index: 2;
}

.splash-phrase {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    display: none;
}

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

.splash-phrase h3 {
    font-family: var(--font-playfair);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 16px;
}

.splash-phrase p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.block-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Cubic Visualization */
.cubic-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

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

/* API Interface */
.api-interface-container {
    max-width: 1200px;
    margin: 0 auto;
}

.glass-shell {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow:
    0 0 40px rgba(56, 189, 248, 0.15),
    0 0 80px rgba(168, 85, 247, 0.1);
}

.api-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg,
                                rgba(15, 23, 42, 0.8) 0%,
                                rgba(30, 41, 59, 0.6) 50%,
                                rgba(49, 46, 129, 0.5) 100%);
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.api-icon img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.6));
    animation: pulse-glow 2s ease-in-out infinite;
}

.api-title-section h3 {
    font-family: var(--font-playfair);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.api-title-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.security-badges {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Panels */
.connection-panel, .input-panel, .output-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--cyan);
    font-weight: 600;
}

.panel-icon {
    font-size: 20px;
}

/* Forms */
.connection-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-input, .email-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: var(--font-merriweather);
}

.api-input:focus, .email-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1), 0 0 20px rgba(56, 189, 248, 0.2);
}

.api-input::placeholder, .email-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.connect-button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.connect-button:hover {
    background: linear-gradient(135deg, #0e7490, #155e75);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.5);
    transform: translateY(-2px);
}

.connect-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.connection-status {
    margin-top: 12px;
    font-size: 0.875rem;
}

.connection-status.success {
    color: #10b981;
}

.connection-status.error {
    color: #ef4444;
}

/* Textarea */
.prompt-textarea {
    width: 100%;
    min-height: 160px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
    font-family: var(--font-merriweather);
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1), 0 0 20px rgba(168, 85, 247, 0.2);
}

.prompt-textarea:disabled {
    opacity: 0.5;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.analyze-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--purple), #c026d3);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analyze-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #9333ea, var(--purple));
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.analyze-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Output */
.output-content {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.output-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.sub-text {
    font-size: 0.875rem;
    margin-top: 8px;
}

/* S.Y.N.P.S Page */
.synps-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

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

/* Dynasty Page */
.dynasty-container {
    max-width: 600px;
    margin: 0 auto;
}

.dynasty-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
}

.subscription-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-status {
    margin-top: 12px;
    font-size: 0.875rem;
    text-align: center;
}

.form-status.success {
    color: #10b981;
}

.form-status.error {
    color: #ef4444;
}

.dynasty-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 1.2rem;
}

/* Metrics Ticker */
.metrics-ticker {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 40px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    flex-wrap: wrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.ticker-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.ticker-value {
    color: var(--cyan);
    font-family: var(--font-orbitron);
    font-weight: 700;
}

/* Animations */
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 24px rgba(157, 0, 255, 0.8));
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-slideIn {
    animation: slideIn 0.5s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Euphoric Glow Transitions */
.euphoric-transition {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    background: radial-gradient(circle at center, var(--transition-color), transparent 70%);
    transition: opacity 0.3s ease;
}

.euphoric-transition.active {
    opacity: 0.3;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--cyan);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .floating-nav {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90%;
    }

    .nav-text {
        display: none;
    }

    .page-section {
        padding: 120px 16px 40px;
    }

    .welcome-card, .dynasty-card, .glass-shell {
        padding: 24px;
    }

    .api-header {
        flex-direction: column;
        text-align: center;
    }

    .security-badges {
        margin-left: 0;
        justify-content: center;
    }

    .input-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .metrics-ticker {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .banner-title {
        flex-direction: column;
        gap: 8px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .dynasty-features {
        flex-direction: column;
        gap: 16px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

.hidden { display: none; }
.visible { display: block; }

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--purple), var(--cyan));
}

/* Selection */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: white;
}
