:root {
    /* Futuristic Color Palette */
    --color-void: #000000;
    --color-space: #0a0a14;
    --color-nebula: #1a1a2e;
    --color-plasma: #16213e;

    --color-cyan: #00fff5;
    --color-magenta: #ff00ff;
    --color-yellow: #ffff00;
    --color-lime: #00ff00;
    --color-purple: #9d00ff;
    --color-orange: #ff6b00;

    /* Typography */
    --font-tech: 'Orbitron', monospace;
    --font-ui: 'Rajdhani', sans-serif;

    /* 3D Settings */
    --perspective: 3000px;
    --camera-distance: 1000px;

    /* Physics */
    --friction: 0.92;
    --acceleration: 0.5;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-ui);
    background: var(--color-void);
    color: var(--color-cyan);
    cursor: crosshair;
}

/* Command Interface */
.command-interface {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 800px;
}

.command-prompt {
    display: flex;
    align-items: center;
    background: rgba(0, 255, 245, 0.05);
    border: 2px solid var(--color-cyan);
    border-radius: 0;
    padding: 15px 20px;
    box-shadow: 0 0 30px rgba(0, 255, 245, 0.3),
        inset 0 0 20px rgba(0, 255, 245, 0.1);
    backdrop-filter: blur(10px);
}

.prompt-symbol {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--color-cyan);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

#commandInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-cyan);
    font-family: var(--font-tech);
    font-size: 1rem;
    outline: none;
    text-transform: uppercase;
}

#commandInput::placeholder {
    color: rgba(0, 255, 245, 0.3);
    text-transform: none;
}

.command-output {
    margin-top: 10px;
    padding: 15px;
    background: rgba(0, 255, 245, 0.05);
    border: 1px solid rgba(0, 255, 245, 0.3);
    font-family: var(--font-tech);
    font-size: 0.9rem;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.command-output.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Hints */
.nav-hints {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hint {
    background: rgba(0, 255, 245, 0.05);
    border: 1px solid rgba(0, 255, 245, 0.3);
    padding: 10px 15px;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

kbd {
    background: rgba(0, 255, 245, 0.2);
    border: 1px solid var(--color-cyan);
    padding: 3px 8px;
    border-radius: 3px;
    font-family: var(--font-tech);
    font-size: 0.75rem;
    margin: 0 2px;
}

/* Coordinates Display */
.coordinates {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 15px;
}

.coord-item {
    background: rgba(0, 255, 245, 0.05);
    border: 1px solid rgba(0, 255, 245, 0.3);
    padding: 10px 15px;
    font-family: var(--font-tech);
    backdrop-filter: blur(10px);
}

.coord-label {
    color: rgba(0, 255, 245, 0.6);
    margin-right: 5px;
}

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

/* Time Display */
.time-display {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 255, 245, 0.05);
    border: 1px solid rgba(0, 255, 245, 0.3);
    padding: 15px 20px;
    font-family: var(--font-tech);
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

/* 3D Space Container */
.space-container {
    width: 100%;
    height: 100%;
    perspective: var(--perspective);
    perspective-origin: 50% 50%;
    position: relative;
    overflow: hidden;
}

/* Generative Canvas */
#generativeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 3D Scene */
.scene-3d {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
    z-index: 2;
}

/* Central Hub */
.hub-central {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) translateZ(0px);
}

.hub-sphere {
    width: 400px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    animation: hubRotate 30s linear infinite;
}

@keyframes hubRotate {
    from {
        transform: rotateY(0deg) rotateX(0deg);
    }

    to {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

.sphere-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    border: 2px solid var(--color-cyan);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--color-cyan),
        inset 0 0 30px var(--color-cyan);
}

.ring-1 {
    width: 400px;
    height: 400px;
    margin: -200px 0 0 -200px;
    transform: rotateX(0deg);
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-2 {
    width: 350px;
    height: 350px;
    margin: -175px 0 0 -175px;
    transform: rotateY(60deg);
    border-color: var(--color-magenta);
    box-shadow: 0 0 30px var(--color-magenta),
        inset 0 0 30px var(--color-magenta);
    animation: ringPulse 3s ease-in-out 1s infinite;
}

.ring-3 {
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    transform: rotateX(90deg);
    border-color: var(--color-yellow);
    box-shadow: 0 0 30px var(--color-yellow),
        inset 0 0 30px var(--color-yellow);
    animation: ringPulse 3s ease-in-out 2s infinite;
}

@keyframes ringPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.sphere-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.hub-title {
    font-family: var(--font-tech);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-cyan);
    text-shadow: 0 0 20px var(--color-cyan),
        0 0 40px var(--color-cyan),
        0 0 60px var(--color-cyan);
    letter-spacing: 10px;
    margin-bottom: 10px;
}

.hub-subtitle {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: rgba(0, 255, 245, 0.7);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Portals */
.portal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.portal:hover {
    transform: translateZ(50px) scale(1.1);
}

.portal-services {
    transform: translate(-50%, -50%) translateZ(-800px) translateX(-600px) translateY(-200px);
}

.portal-portfolio {
    transform: translate(-50%, -50%) translateZ(-800px) translateX(600px) translateY(-200px);
}

.portal-about {
    transform: translate(-50%, -50%) translateZ(-800px) translateX(-600px) translateY(200px);
}

.portal-contact {
    transform: translate(-50%, -50%) translateZ(-800px) translateX(600px) translateY(200px);
}

.portal-secret {
    transform: translate(-50%, -50%) translateZ(-1200px) translateY(-400px);
    opacity: 0.3;
}

.portal-secret:hover {
    opacity: 1;
}

.portal-frame {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
}

.portal-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid;
    border-radius: 50%;
    animation: portalSpin 4s linear infinite;
}

.portal-services .portal-glow {
    border-color: var(--color-cyan);
    box-shadow: 0 0 40px var(--color-cyan),
        inset 0 0 40px var(--color-cyan);
}

.portal-portfolio .portal-glow {
    border-color: var(--color-magenta);
    box-shadow: 0 0 40px var(--color-magenta),
        inset 0 0 40px var(--color-magenta);
}

.portal-about .portal-glow {
    border-color: var(--color-yellow);
    box-shadow: 0 0 40px var(--color-yellow),
        inset 0 0 40px var(--color-yellow);
}

.portal-contact .portal-glow {
    border-color: var(--color-lime);
    box-shadow: 0 0 40px var(--color-lime),
        inset 0 0 40px var(--color-lime);
}

.portal-secret .portal-glow {
    border-color: var(--color-purple);
    box-shadow: 0 0 40px var(--color-purple),
        inset 0 0 40px var(--color-purple);
}

@keyframes portalSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.portal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.portal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: inherit;
}

.portal-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px currentColor);
}

.portal-title {
    font-family: var(--font-tech);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 20px currentColor;
}

.portal-desc {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* World Content */
.world-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(1000px);
    width: 90vw;
    max-width: 1200px;
    padding: 60px;
    background: rgba(10, 10, 20, 0.9);
    border: 2px solid var(--color-cyan);
    box-shadow: 0 0 60px rgba(0, 255, 245, 0.5),
        inset 0 0 60px rgba(0, 255, 245, 0.1);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.world-content.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) translateZ(0px);
}

.world-title {
    font-family: var(--font-tech);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-cyan);
    text-shadow: 0 0 30px var(--color-cyan);
    letter-spacing: 8px;
}

/* Services World */
.services-orbit {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto;
}

.service-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    padding: 20px;
    background: rgba(0, 255, 245, 0.05);
    border: 1px solid var(--color-cyan);
    text-align: center;
    transform: rotate(var(--angle)) translateY(-250px) rotate(calc(-1 * var(--angle)));
    transition: all 0.3s ease;
}

.service-node:hover {
    background: rgba(0, 255, 245, 0.15);
    box-shadow: 0 0 30px var(--color-cyan);
    transform: rotate(var(--angle)) translateY(-250px) rotate(calc(-1 * var(--angle))) scale(1.1);
}

.service-node h3 {
    font-family: var(--font-tech);
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-cyan);
}

.service-node p {
    font-size: 0.85rem;
    color: rgba(0, 255, 245, 0.7);
    line-height: 1.4;
}

/* Portfolio World */
.portfolio-grid-3d {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.project-cube {
    width: 100%;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.project-cube:hover {
    transform: rotateY(180deg);
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    border: 2px solid var(--color-magenta);
    background: rgba(255, 0, 255, 0.05);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}

.cube-face.front {
    transform: rotateY(0deg);
}

.cube-face.back {
    transform: rotateY(180deg);
}

.cube-face h3 {
    font-family: var(--font-tech);
    font-size: 1.8rem;
    color: var(--color-magenta);
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--color-magenta);
}

.project-tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 0, 255, 0.2);
    border: 1px solid var(--color-magenta);
    font-family: var(--font-tech);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cube-face p {
    color: rgba(255, 0, 255, 0.8);
    line-height: 1.6;
    text-align: center;
}

/* About World */
.about-data {
    max-width: 900px;
    margin: 0 auto;
}

.data-stream {
    display: flex;
    justify-content: space-around;
    margin-bottom: 60px;
}

.stat-hologram {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border: 2px solid var(--color-yellow);
    background: rgba(255, 255, 0, 0.05);
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.3);
}

.stat-value {
    font-family: var(--font-tech);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-yellow);
    text-shadow: 0 0 30px var(--color-yellow);
    margin-bottom: 10px;
}

.stat-label {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: rgba(255, 255, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.mission-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.mission-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 0, 0.8);
    margin-bottom: 20px;
}

.mission-text strong {
    color: var(--color-yellow);
    text-shadow: 0 0 10px var(--color-yellow);
}

/* Contact World */
.quantum-form {
    max-width: 600px;
    margin: 0 auto 60px;
}

.form-field {
    position: relative;
    margin-bottom: 40px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 255, 0, 0.05);
    border: 2px solid var(--color-lime);
    color: var(--color-lime);
    font-family: var(--font-tech);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.form-field label {
    position: absolute;
    top: -12px;
    left: 15px;
    background: var(--color-space);
    padding: 0 10px;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--color-lime);
    letter-spacing: 2px;
}

.field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-lime);
    box-shadow: 0 0 10px var(--color-lime);
    transition: width 0.3s ease;
}

.form-field input:focus~.field-line,
.form-field textarea:focus~.field-line {
    width: 100%;
}

.quantum-button {
    position: relative;
    width: 100%;
    padding: 20px;
    background: transparent;
    border: 3px solid var(--color-lime);
    color: var(--color-lime);
    font-family: var(--font-tech);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.quantum-button:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 40px var(--color-lime);
    transform: scale(1.02);
}

.button-text {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.quantum-button:hover .button-glow {
    width: 400px;
    height: 400px;
}

.contact-data {
    max-width: 600px;
    margin: 0 auto;
}

.contact-line {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    font-family: var(--font-tech);
}

.data-label {
    color: rgba(0, 255, 0, 0.6);
    letter-spacing: 2px;
}

.data-value {
    color: var(--color-lime);
}

/* Secret World */
.secret-world {
    border-color: var(--color-purple);
    box-shadow: 0 0 60px rgba(157, 0, 255, 0.5);
}

.secret-world .world-title {
    color: var(--color-purple);
    text-shadow: 0 0 30px var(--color-purple);
}

.secret-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.secret-message p {
    font-size: 1.3rem;
    color: var(--color-purple);
    margin-bottom: 20px;
    line-height: 1.8;
}

.secret-code {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    padding: 20px;
    background: rgba(157, 0, 255, 0.1);
    border: 2px solid var(--color-purple);
    box-shadow: 0 0 30px rgba(157, 0, 255, 0.5);
    letter-spacing: 4px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-void);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

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

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spinRing 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-top-color: var(--color-cyan);
    animation-duration: 2s;
}

.spinner-ring:nth-child(2) {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    border-top-color: var(--color-magenta);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border-top-color: var(--color-yellow);
    animation-duration: 1s;
}

@keyframes spinRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    color: var(--color-cyan);
    margin-bottom: 30px;
    letter-spacing: 4px;
}

.loading-bar {
    width: 400px;
    height: 4px;
    background: rgba(0, 255, 245, 0.2);
    margin: 0 auto 20px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: var(--color-cyan);
    box-shadow: 0 0 20px var(--color-cyan);
    width: 0;
    transition: width 0.3s ease;
}

.loading-tip {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: rgba(0, 255, 245, 0.6);
}

/* Welcome Modal */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.welcome-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    max-width: 700px;
    padding: 60px;
    background: var(--color-space);
    border: 3px solid var(--color-cyan);
    box-shadow: 0 0 60px rgba(0, 255, 245, 0.5);
    text-align: center;
}

.modal-content h2 {
    font-family: var(--font-tech);
    font-size: 2.5rem;
    color: var(--color-cyan);
    margin-bottom: 30px;
    text-shadow: 0 0 30px var(--color-cyan);
    letter-spacing: 6px;
}

.modal-content p {
    font-size: 1.2rem;
    color: rgba(0, 255, 245, 0.8);
    margin-bottom: 40px;
    line-height: 1.6;
}

.instructions {
    text-align: left;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(0, 255, 245, 0.05);
    border: 1px solid rgba(0, 255, 245, 0.3);
}

.instructions h3 {
    font-family: var(--font-tech);
    font-size: 1.3rem;
    color: var(--color-cyan);
    margin-bottom: 20px;
}

.instructions ul {
    list-style: none;
}

.instructions li {
    font-size: 1rem;
    color: rgba(0, 255, 245, 0.8);
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.instructions li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-cyan);
}

.start-button {
    padding: 20px 60px;
    background: transparent;
    border: 3px solid var(--color-cyan);
    color: var(--color-cyan);
    font-family: var(--font-tech);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-button:hover {
    background: rgba(0, 255, 245, 0.2);
    box-shadow: 0 0 40px var(--color-cyan);
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .portal {
        transform: scale(0.8);
    }

    .services-orbit {
        width: 400px;
        height: 400px;
    }

    .service-node {
        width: 150px;
        padding: 15px;
        transform: rotate(var(--angle)) translateY(-180px) rotate(calc(-1 * var(--angle)));
    }

    .portfolio-grid-3d {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .command-interface {
        width: 95%;
    }

    .nav-hints,
    .coordinates {
        font-size: 0.7rem;
    }

    .hub-title {
        font-size: 2rem;
    }

    .world-content {
        padding: 30px;
    }

    .world-title {
        font-size: 2rem;
    }

    .modal-content {
        padding: 30px;
    }
}