/* ============================================
   RICK & MORTY MULTIVERSE STYLES
   Portal Effects, Universe Sections
   ============================================ */

/* Portal Overlay */
.portal-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portal-overlay.active {
    width: 100vw;
    height: 100vh;
    opacity: 1;
}

.portal-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid var(--portal-green);
    border-radius: 50%;
    animation: portalSpin 2s linear infinite;
}

.portal-ring.ring-1 {
    width: 200px;
    height: 200px;
    border-color: var(--portal-green);
}

.portal-ring.ring-2 {
    width: 300px;
    height: 300px;
    border-color: var(--toxic-yellow);
    animation-duration: 3s;
    animation-direction: reverse;
}

.portal-ring.ring-3 {
    width: 400px;
    height: 400px;
    border-color: var(--cosmic-purple);
    animation-duration: 4s;
}

.portal-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--portal-green), transparent);
    border-radius: 50%;
    animation: portalPulse 1s ease-in-out infinite;
}

@keyframes portalSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes portalPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Narration Box */
.narration-box {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid var(--portal-green);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    max-width: 600px;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(10px);
}

.narration-box.active {
    opacity: 1;
}

.narration-text {
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    font-style: italic;
}

.narration-text-large {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--toxic-yellow);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    text-align: center;
    margin: 2rem 0;
    font-style: italic;
    text-shadow: 0 0 20px rgba(207, 255, 0, 0.5);
}

/* Logo Updates */
.logo-subtitle {
    font-size: 0.7rem;
    color: var(--toxic-yellow);
    font-family: 'Bungee Inline', cursive;
    letter-spacing: 2px;
    margin-top: 0.25rem;
}

.multiverse-tagline {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--toxic-yellow);
    font-family: 'Bungee Inline', cursive;
    margin-top: 0.5rem;
    text-shadow: 0 0 20px rgba(207, 255, 0, 0.5);
}

/* Portal Glitch Effect */
.glitch-portal {
    position: relative;
    animation: portalGlitch 3s infinite;
}

@keyframes portalGlitch {
    0%, 90%, 100% {
        text-shadow: 0 0 10px var(--portal-green), 0 0 20px var(--portal-green);
    }
    5% {
        text-shadow: 2px 0 var(--toxic-yellow), -2px 0 var(--cosmic-purple);
        transform: translateX(2px);
    }
    10% {
        text-shadow: -2px 0 var(--toxic-yellow), 2px 0 var(--cosmic-purple);
        transform: translateX(-2px);
    }
}

/* Universe Sections */
.universe-1,
.universe-2,
.universe-3,
.universe-4 {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.universe-1 {
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
}

.universe-2 {
    background: linear-gradient(180deg, rgba(143, 0, 255, 0.2) 0%, rgba(207, 255, 0, 0.1) 100%);
}

.universe-3 {
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.15) 0%, transparent 70%);
}

.universe-4 {
    background: radial-gradient(ellipse at center, rgba(143, 0, 255, 0.2) 0%, rgba(0, 255, 136, 0.1) 50%, transparent 100%);
}

/* Floating Debris */
.floating-debris {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.debris {
    position: absolute;
    opacity: 0.6;
    animation: floatDebris 10s ease-in-out infinite;
}

.debris.pizza {
    width: 60px;
    height: 60px;
    background: var(--toxic-yellow);
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.debris.laptop {
    width: 80px;
    height: 50px;
    background: var(--portal-green);
    border-radius: 5px;
    top: 40%;
    right: 15%;
    animation-delay: 2s;
}

.debris.code {
    width: 100px;
    height: 4px;
    background: var(--cosmic-purple);
    top: 60%;
    left: 20%;
    animation-delay: 4s;
}

.debris.paper {
    width: 50px;
    height: 70px;
    background: var(--toxic-yellow);
    opacity: 0.4;
    top: 30%;
    right: 30%;
    animation-delay: 6s;
}

@keyframes floatDebris {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Portal Entrance */
.portal-entrance {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    border: 4px solid var(--portal-green);
    border-radius: 50%;
    opacity: 0.3;
    animation: portalEntrance 3s ease-in-out infinite;
}

@keyframes portalEntrance {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 0.6;
    }
}

/* Error Dimension */
.error-dimension {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
}

.error-cube {
    background: rgba(255, 0, 64, 0.2);
    border: 2px solid #ff0040;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff0040;
    font-family: 'Orbitron', sans-serif;
    transform-origin: center;
}

.error-cube.floating {
    animation: errorFloat 3s ease-in-out infinite;
}

.error-cube:nth-child(1) { animation-delay: 0s; }
.error-cube:nth-child(2) { animation-delay: 0.5s; }
.error-cube:nth-child(3) { animation-delay: 1s; }
.error-cube:nth-child(4) { animation-delay: 1.5s; }
.error-cube:nth-child(5) { animation-delay: 2s; }

@keyframes errorFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Universe Content */
.universe-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.universe-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 2rem;
    background: var(--portal-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.universe-description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* Lab Environment */
.lab-environment {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.lab-arm {
    position: absolute;
    width: 200px;
    height: 20px;
    background: var(--portal-green);
    border-radius: 10px;
    opacity: 0.6;
    animation: labArmMove 4s ease-in-out infinite;
}

.lab-arm.arm-1 {
    top: 30%;
    left: 20%;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.lab-arm.arm-2 {
    top: 60%;
    right: 25%;
    transform: rotate(-45deg);
    animation-delay: 2s;
}

@keyframes labArmMove {
    0%, 100% {
        transform: rotate(45deg) translateX(0);
    }
    50% {
        transform: rotate(45deg) translateX(50px);
    }
}

.lab-reactor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border: 3px solid var(--portal-green);
    border-radius: 50%;
    animation: reactorPulse 2s ease-in-out infinite;
}

@keyframes reactorPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--portal-green), 0 0 40px var(--portal-green);
    }
    50% {
        box-shadow: 0 0 40px var(--portal-green), 0 0 80px var(--portal-green);
    }
}

/* Discovery Timeline */
.discovery-timeline {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 3rem 0;
}

.timeline-item {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--portal-green);
    border-radius: 10px;
    padding: 1rem 2rem;
    color: var(--portal-green);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    animation: timelineGlow 2s ease-in-out infinite;
}

.timeline-item:nth-child(1) { animation-delay: 0s; }
.timeline-item:nth-child(2) { animation-delay: 0.5s; }
.timeline-item:nth-child(3) { animation-delay: 1s; }
.timeline-item:nth-child(4) { animation-delay: 1.5s; }

@keyframes timelineGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    }
}

/* Kurusa Reactor */
.kurusa-reactor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.reactor-core {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--portal-green), var(--toxic-yellow));
    border-radius: 50%;
    animation: corePulse 2s ease-in-out infinite;
}

.reactor-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.reactor-rings .ring {
    position: absolute;
    border: 2px solid var(--portal-green);
    border-radius: 50%;
    animation: ringRotate 4s linear infinite;
}

.reactor-rings .ring:nth-child(1) {
    width: 150px;
    height: 150px;
    top: -75px;
    left: -75px;
}

.reactor-rings .ring:nth-child(2) {
    width: 200px;
    height: 200px;
    top: -100px;
    left: -100px;
    animation-duration: 6s;
    animation-direction: reverse;
}

.reactor-rings .ring:nth-child(3) {
    width: 250px;
    height: 250px;
    top: -125px;
    left: -125px;
    animation-duration: 8s;
}

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

/* Portal Buttons */
.btn-portal {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    border-radius: 50px;
    background: var(--portal-gradient);
    color: var(--galactic-black);
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--portal-green);
}

.btn-portal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-portal:hover::before {
    width: 300px;
    height: 300px;
}

.btn-portal:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.5);
}

.btn-portal-large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    border-radius: 50px;
    background: var(--portal-gradient);
    color: var(--galactic-black);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--portal-green);
}

.btn-portal-large .portal-icon {
    font-size: 1.5rem;
    animation: iconSpin 2s linear infinite;
}

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

.btn-portal-large:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 255, 136, 0.6);
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 3rem 0;
}

/* Portal Indicator */
.portal-indicator {
    flex-direction: column;
    gap: 1rem;
}

.portal-indicator .portal-glow {
    width: 40px;
    height: 40px;
    border: 2px solid var(--portal-green);
    border-radius: 50%;
    animation: portalIndicator 2s ease-in-out infinite;
}

@keyframes portalIndicator {
    0%, 100% {
        box-shadow: 0 0 10px var(--portal-green);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px var(--portal-green);
        transform: scale(1.2);
    }
}

.portal-indicator span {
    color: var(--toxic-yellow);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
}

/* Project Planets */
.project-planet {
    position: relative;
}

.planet-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.project-planet:hover .planet-glow {
    opacity: 1;
    animation: planetPulse 2s ease-in-out infinite;
}

@keyframes planetPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.planet-icon {
    position: relative;
    z-index: 1;
}

/* Founder Cards */
.founder-card {
    position: relative;
}

.founder-portal {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    border: 2px solid var(--portal-green);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.founder-card:hover .founder-portal {
    opacity: 0.6;
    animation: founderPortalSpin 3s linear infinite;
}

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

.portal-glow {
    background: radial-gradient(circle, var(--portal-green), transparent);
}

.member-title {
    font-size: 0.9rem;
    color: var(--toxic-yellow);
    margin-top: 0.25rem;
    font-family: 'Orbitron', sans-serif;
}

/* Join Quote */
.join-quote {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--toxic-yellow);
    font-family: 'Bungee Inline', cursive;
    margin: 2rem 0;
    text-shadow: 0 0 20px rgba(207, 255, 0, 0.5);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .narration-box {
        bottom: 50px;
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
    }
    
    .error-dimension {
        flex-direction: column;
        align-items: center;
    }
    
    .discovery-timeline {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-portal-large {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

