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

body {
    font-family: 'Orbitron', 'Exo 2', 'Rajdhani', 'Courier New', monospace;
    background: radial-gradient(ellipse at center, #0a0a2e 0%, #16213e 35%, #000000 100%);
    color: #00ffff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.warp-tunnel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.tunnel-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tunnel-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: warp-tunnel 8s linear infinite;
}

.layer-1 {
    background: radial-gradient(circle, transparent 20%, rgba(0, 150, 255, 0.15) 40%, rgba(0, 100, 200, 0.25) 60%, transparent 80%);
    animation-duration: 3s;
    animation-delay: 0s;
}

.layer-2 {
    background: radial-gradient(circle, transparent 15%, rgba(100, 0, 255, 0.2) 35%, rgba(150, 0, 200, 0.3) 55%, transparent 75%);
    animation-duration: 4s;
    animation-delay: -1s;
}

.layer-3 {
    background: radial-gradient(circle, transparent 10%, rgba(255, 100, 0, 0.15) 30%, rgba(255, 150, 0, 0.25) 50%, transparent 70%);
    animation-duration: 5s;
    animation-delay: -2s;
}

@keyframes warp-tunnel {
    0% {
        transform: scale(0.3) translateZ(0);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        transform: scale(1.2) translateZ(0);
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: scale(3) translateZ(0);
        opacity: 0;
    }
}

.energy-burst {
    position: absolute;
    top: 50%;
    left: 20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 200, 0, 0.9) 0%, rgba(255, 100, 0, 0.7) 30%, rgba(100, 0, 255, 0.5) 60%, transparent 100%);
    border-radius: 50%;
    animation: energy-pulse 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes energy-pulse {
    0%, 100% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: scale(2) rotate(360deg);
        opacity: 1;
    }
}

.warp-streaks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 20%, rgba(0, 200, 255, 0.15) 40%, transparent 60%),
        linear-gradient(-45deg, transparent 20%, rgba(255, 100, 0, 0.15) 40%, transparent 60%),
        linear-gradient(90deg, transparent 30%, rgba(100, 0, 255, 0.15) 40%, transparent 50%);
    animation: warp-streaks 1s linear infinite;
    z-index: 3;
}

@keyframes warp-streaks {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes warp-tunnel-start {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.stars, .twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 4;
}

.stars {
    background: #000 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white"/><circle cx="80" cy="40" r="0.5" fill="white"/><circle cx="40" cy="80" r="1.5" fill="white"/><circle cx="90" cy="10" r="0.8" fill="white"/><circle cx="10" cy="90" r="1.2" fill="white"/><circle cx="60" cy="30" r="0.6" fill="white"/><circle cx="30" cy="60" r="1" fill="white"/><circle cx="70" cy="70" r="0.4" fill="white"/><circle cx="50" cy="10" r="0.9" fill="white"/><circle cx="15" cy="50" r="1.1" fill="white"/></svg>') repeat;
    background-size: 200px 200px;
    animation: move-twink-back 200s linear infinite;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="1" fill="white" opacity="0.8"/><circle cx="75" cy="45" r="0.5" fill="white" opacity="0.6"/><circle cx="45" cy="75" r="1.5" fill="white" opacity="0.9"/><circle cx="85" cy="15" r="0.8" fill="white" opacity="0.7"/><circle cx="15" cy="85" r="1.2" fill="white" opacity="0.8"/></svg>') repeat;
    background-size: 200px 200px;
    animation: move-twink-back 100s linear infinite;
}

@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}


.container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    padding: clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
    pointer-events: auto;
}

/* Logo container */
.logo-container {
    position: relative;
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
    box-sizing: border-box;
}

.logo {
    font-family: 'Press Start 2P', 'VT323', 'Courier New', monospace;
    font-size: clamp(1.8rem, 6vw, 5rem);
    font-weight: 400;
    text-transform: none;
    letter-spacing: clamp(0.05em, 0.5vw, 0.1em);
    color: #00ff00;
    text-shadow: 
        1px 0 0 #ffffff,
        -1px 0 0 #ffffff,
        0 1px 0 #ffffff,
        0 -1px 0 #ffffff,
        1px 1px 0 #ffffff,
        -1px -1px 0 #ffffff,
        1px -1px 0 #ffffff,
        -1px 1px 0 #ffffff;
    animation: pixel-glow 3s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    -webkit-text-stroke: 0.5px #ffffff;
    font-stretch: normal;
    background: none;
    -webkit-text-fill-color: #00ff00;
    animation: breathing-glow 4s ease-in-out infinite;
    filter: none;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) rotateZ(var(--rotate-z, 0deg)) translateZ(20px);
    -webkit-transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) rotateZ(var(--rotate-z, 0deg)) translateZ(20px);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    line-height: 1.2;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

@keyframes breathing-glow {
    0%, 100% {
        text-shadow: 
            1px 0 0 #ffffff,
            -1px 0 0 #ffffff,
            0 1px 0 #ffffff,
            0 -1px 0 #ffffff,
            1px 1px 0 #ffffff,
            -1px -1px 0 #ffffff,
            1px -1px 0 #ffffff,
            -1px 1px 0 #ffffff,
            0 0 3px #00ff00;
        filter: brightness(1);
    }
    25% {
        text-shadow: 
            1px 0 0 #ffffff,
            -1px 0 0 #ffffff,
            0 1px 0 #ffffff,
            0 -1px 0 #ffffff,
            1px 1px 0 #ffffff,
            -1px -1px 0 #ffffff,
            1px -1px 0 #ffffff,
            -1px 1px 0 #ffffff,
            0 0 5px #00ff00,
            0 0 8px #00ff00;
        filter: brightness(1.1);
    }
    50% {
        text-shadow: 
            1px 0 0 #ffffff,
            -1px 0 0 #ffffff,
            0 1px 0 #ffffff,
            0 -1px 0 #ffffff,
            1px 1px 0 #ffffff,
            -1px -1px 0 #ffffff,
            1px -1px 0 #ffffff,
            -1px 1px 0 #ffffff,
            0 0 6px #00ff00,
            0 0 12px #00ff00;
        filter: brightness(1.2);
    }
    75% {
        text-shadow: 
            1px 0 0 #ffffff,
            -1px 0 0 #ffffff,
            0 1px 0 #ffffff,
            0 -1px 0 #ffffff,
            1px 1px 0 #ffffff,
            -1px -1px 0 #ffffff,
            1px -1px 0 #ffffff,
            -1px 1px 0 #ffffff,
            0 0 5px #00ff00,
            0 0 8px #00ff00;
        filter: brightness(1.1);
    }
}

@keyframes matrix-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 50vw, 400px);
    height: clamp(100px, 20vw, 150px);
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    animation: breathing-pulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes breathing-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.4;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.3;
    }
}

.energy-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(400px, 60vw, 500px);
    height: clamp(150px, 25vw, 200px);
    background: radial-gradient(ellipse, transparent 20%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.05) 60%, transparent 80%);
    border-radius: 50%;
    animation: breathing-energy-wave 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes breathing-energy-wave {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.05;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.0);
        opacity: 0.1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.15;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.0);
        opacity: 0.1;
    }
}

/* Particle effects */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ff00;
    border-radius: 50%;
    animation: float 6s linear infinite;
    box-shadow: 0 0 6px #00ff00;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(150px);
        opacity: 0;
    }
}

/* Energy particle effects */
.energy-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.energy-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, #00ff00 0%, #00cc00 50%, transparent 100%);
    border-radius: 50%;
    animation: energy-float 8s linear infinite;
    box-shadow: 0 0 10px #00ff00;
}

@keyframes energy-float {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
        transform: translateY(95vh) translateX(30px) scale(1);
    }
    50% {
        transform: translateY(50vh) translateX(-50px) scale(1.3);
    }
    95% {
        opacity: 1;
        transform: translateY(5vh) translateX(80px) scale(0.6);
    }
    100% {
        transform: translateY(-100px) translateX(120px) scale(0);
        opacity: 0;
    }
}

/* Scan line effects */
.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.08) 2px,
        rgba(0, 255, 0, 0.08) 4px
    );
    animation: scan 0.15s linear infinite;
    pointer-events: none;
    z-index: 5;
    opacity: 0.7;
}

@keyframes scan {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* Responsive design */
/* Large screen optimization */
@media (min-width: 1200px) {
    .logo {
        font-size: clamp(4rem, 5vw, 6rem);
        letter-spacing: clamp(0.08em, 0.3vw, 0.12em);
    }
}

/* Tablet landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .logo {
        font-size: clamp(2.5rem, 5vw, 4rem);
        letter-spacing: clamp(0.06em, 0.4vw, 0.08em);
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .logo {
        font-size: clamp(2rem, 5vw, 3.5rem);
        letter-spacing: clamp(0.05em, 0.5vw, 0.08em);
    }
    
    .glow {
        width: clamp(250px, 45vw, 350px);
        height: clamp(80px, 15vw, 120px);
    }
    
    .energy-pulse {
        width: clamp(300px, 55vw, 400px);
        height: clamp(120px, 20vw, 150px);
    }
}

/* Mobile landscape */
@media (max-width: 640px) and (orientation: landscape) {
    .logo {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        letter-spacing: clamp(0.04em, 0.3vw, 0.06em);
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .logo {
        font-size: clamp(1.5rem, 5vw, 2.8rem);
        letter-spacing: clamp(0.04em, 0.4vw, 0.06em);
    }
    
    .glow {
        width: clamp(200px, 40vw, 300px);
        height: clamp(60px, 12vw, 100px);
    }
    
    .energy-pulse {
        width: clamp(250px, 50vw, 350px);
        height: clamp(100px, 18vw, 120px);
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .logo {
        font-size: clamp(1.2rem, 4vw, 2rem);
        letter-spacing: clamp(0.03em, 0.3vw, 0.05em);
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .container {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .logo {
        -webkit-text-stroke: 0.5px #ffffff;
        -webkit-font-smoothing: antialiased;
    }
    
    /* Fix iOS Safari 3D transform issues */
    .logo {
        transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) rotateZ(var(--rotate-z, 0deg)) translateZ(20px);
        -webkit-transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) rotateZ(var(--rotate-z, 0deg)) translateZ(20px);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
    }
}
