/* ==========================================================================
   WORQSHOP ARGON ENGINE - STEP 2: 3D PORTAL STAGE, GLASS-Q & MICRO-UIS
   Datei: css/portal.css
   ========================================================================== */

#intro-portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5000;
    perspective: 1100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(
        circle at center,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(5, 8, 17, 0.96) 100%
    );
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

#intro-portal.portal-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==========================================================================
   AMBIENT NEON BLOBS IM HINTERGRUND DES PORTALS
   ========================================================================== */
.intro-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(115px);
    pointer-events: none;
    z-index: -1;
}

.blob-violet {
    width: 580px;
    height: 580px;
    background: rgba(138, 43, 226, 0.26);
    top: 12%;
    left: 18%;
}

.blob-cyan {
    width: 520px;
    height: 520px;
    background: rgba(0, 240, 255, 0.19);
    bottom: 12%;
    right: 18%;
}

/* ==========================================================================
   3D CAMERA RIG & HIGH-G HYPER-SHAKE
   ========================================================================== */
.camera-rig {
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

@keyframes hyper-shake {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    20% { transform: translate3d(-4px, 3px, 0) rotate(-0.45deg); }
    40% { transform: translate3d(5px, -4px, 0) rotate(0.45deg); }
    60% { transform: translate3d(-5px, -2px, 0) rotate(-0.35deg); }
    80% { transform: translate3d(4px, 4px, 0) rotate(0.35deg); }
}

.shaking {
    animation: hyper-shake 0.11s infinite;
}

/* ==========================================================================
   WORQSHOP LOGO-KOMPOSITION (WOR + Q + SHOP)
   ========================================================================== */
.logo-assembly {
    position: relative;
    display: flex;
    align-items: center;
    transform-style: preserve-3d;
}

.word-wor,
.word-shop-wrap {
    font-size: clamp(4.2rem, 9vw, 8.5rem);
    font-weight: 900;
    letter-spacing: -3px;
    color: var(--bright-white);
    text-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.75),
        0 0 28px rgba(255, 255, 255, 0.14);
    user-select: none;
    will-change: transform, opacity, filter;
}

.word-shop-wrap {
    display: flex;
    flex-direction: column;
    line-height: 0.92;
}

.sub-domain {
    font-size: clamp(0.85rem, 1.5vw, 1.35rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 1.5px;
    text-align: right;
    margin-top: 8px;
    padding-right: 6px;
}

/* ==========================================================================
   DAS 3D-GLAS-Q PORTAL (TORUS, VORTEX & SCHOCKWELLE)
   ========================================================================== */
.q-portal-wrapper {
    position: relative;
    width: clamp(125px, 16vw, 178px);
    height: clamp(125px, 16vw, 178px);
    margin: 0 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Explosions-Schockwelle beim Klick */
.shockwave-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--cyber-cyan);
    box-shadow: 
        0 0 45px var(--cyber-cyan),
        inset 0 0 35px var(--neon-pink);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.shockwave-active {
    animation: shockwave-blast 0.92s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shockwave-blast {
    0% { transform: scale(0.7); opacity: 1; border-width: 9px; }
    100% { transform: scale(6.8); opacity: 0; border-width: 1px; }
}

/* Äußerer 3D-Neon-Torus des Q */
.q-torus {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 135deg,
        var(--cyber-cyan) 0deg,
        var(--electric-blue) 75deg,
        var(--neon-violet) 165deg,
        var(--neon-pink) 235deg,
        var(--neon-violet) 300deg,
        var(--cyber-cyan) 360deg
    );
    box-shadow: 
        0 0 48px rgba(138, 43, 226, 0.68),
        0 0 90px rgba(0, 240, 255, 0.38),
        inset 0 0 24px rgba(255, 255, 255, 0.68);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    will-change: transform, filter;
}

/* Edle Glas-Spiegelung auf dem Ring */
.q-torus::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.38);
    mask-image: linear-gradient(135deg, black 0%, transparent 60%);
    -webkit-mask-image: linear-gradient(135deg, black 0%, transparent 60%);
    pointer-events: none;
}

/* Der dunkle Vortex-Schlund im Zentrum des Q */
.q-vortex-hole {
    width: 67%;
    height: 67%;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        #02040a 35%,
        #091326 80%,
        #1e1b4b 100%
    );
    box-shadow: 
        inset 0 12px 28px rgba(0, 0, 0, 0.96),
        inset 0 0 26px rgba(0, 240, 255, 0.48),
        0 0 20px rgba(0, 240, 255, 0.42);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 4;
}

/* Rotierendes Energie-Raster im Vortex */
.vortex-inner-grid {
    position: absolute;
    width: 145%;
    height: 145%;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(0, 240, 255, 0.09) 0deg 10deg,
        transparent 10deg 20deg
    );
    animation: spin-vortex 18s linear infinite;
    pointer-events: none;
}

@keyframes spin-vortex {
    100% { transform: rotate(360deg); }
}

/* Der Q-Schweif unten rechts */
.q-tail-wing {
    position: absolute;
    bottom: -10px;
    right: -12px;
    width: 38%;
    height: 17%;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--electric-blue), var(--neon-pink));
    border-radius: 30px;
    transform: rotate(42deg);
    z-index: 2;
    box-shadow: 
        0 0 32px var(--cyber-cyan),
        inset 0 2px 6px rgba(255, 255, 255, 0.65);
    transition: opacity 0.3s ease, transform 0.4s ease;
}

/* ==========================================================================
   DER INTERAKTIVE PLAY-CORE MIT SONAR-IMPULSEN
   ========================================================================== */
.play-trigger {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
}

.play-trigger::before,
.play-trigger::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid var(--cyber-cyan);
    opacity: 0;
    animation: sonar-pulse 2.6s infinite ease-out;
}

.play-trigger::after {
    animation-delay: 1.3s;
    border-color: var(--neon-pink);
}

@keyframes sonar-pulse {
    0% { transform: scale(0.6); opacity: 0.85; }
    100% { transform: scale(1.8); opacity: 0; }
}

.play-triangle {
    width: 38%;
    height: 42%;
    background: linear-gradient(135deg, #ffffff 0%, var(--cyber-cyan) 45%, var(--electric-blue) 100%);
    clip-path: polygon(12% 0%, 12% 100%, 95% 50%);
    margin-left: 8%;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.92));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    animation: core-breathe 2.2s infinite ease-in-out;
}

@keyframes core-breathe {
    0%, 100% { transform: scale(1); }
    50% { 
        transform: scale(1.15); 
        filter: drop-shadow(0 0 25px var(--cyber-cyan)) drop-shadow(0 0 14px var(--neon-pink)); 
    }
}

.play-trigger:hover .play-triangle {
    animation: none;
    transform: scale(1.3);
    filter: drop-shadow(0 0 30px #ffffff) drop-shadow(0 0 42px var(--cyber-cyan));
}

/* ==========================================================================
   FLOATING MICRO-UI FENSTER & STERN-PARTIKEL
   ========================================================================== */
.floating-deco {
    position: absolute;
    pointer-events: none;
    z-index: 8;
    will-change: transform, opacity;
}

.micro-window {
    background: rgba(23, 33, 53, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 10px;
    box-shadow: 
        0 14px 30px rgba(0, 0, 0, 0.65),
        0 0 16px rgba(0, 240, 255, 0.16);
}

.win-dots {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.win-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.win-dots span:nth-child(1) { background: #ff5f56; }
.win-dots span:nth-child(2) { background: #ffbd2e; }
.win-dots span:nth-child(3) { background: #27c93f; }

.deco-code-left {
    top: -28px;
    left: -44px;
    animation: hover-bob 3.8s infinite ease-in-out alternate;
}

.deco-code-left .code-tag {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--cyber-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}

.deco-lines-right {
    top: -36px;
    right: -56px;
    width: 78px;
    animation: hover-bob 4.4s infinite ease-in-out alternate-reverse;
}

.bar-line {
    height: 4px;
    border-radius: 3px;
    margin-bottom: 5px;
}

.bar-line.c1 { width: 100%; background: var(--cyber-cyan); box-shadow: 0 0 8px var(--cyber-cyan); }
.bar-line.c2 { width: 72%; background: var(--neon-pink); box-shadow: 0 0 8px var(--neon-pink); }
.bar-line.c3 { width: 45%; background: var(--neon-violet); margin-bottom: 0; }

.sparkle {
    font-size: 1.35rem;
    animation: sparkle-twinkle 2.8s infinite ease-in-out alternate;
}

.sp-1 { top: -48px; left: 38px; color: var(--neon-pink); text-shadow: 0 0 12px var(--neon-pink); }
.sp-2 { bottom: -28px; left: -24px; color: var(--cyber-cyan); font-weight: 900; font-family: monospace; }
.sp-3 { bottom: 6px; right: -45px; color: var(--neon-violet); font-size: 1.1rem; animation-delay: 1s; }
.sp-4 { top: 15px; right: -68px; color: var(--bright-white); font-weight: 900; font-family: monospace; animation-delay: 0.6s; }

@keyframes hover-bob {
    0% { transform: translateY(0px) rotate(-2deg); }
    100% { transform: translateY(-13px) rotate(2deg); }
}

@keyframes sparkle-twinkle {
    0% { opacity: 0.35; transform: scale(0.75) rotate(0deg); }
    100% { opacity: 1; transform: scale(1.25) rotate(20deg); }
}

/* ==========================================================================
   PORTAL HUD STATUS-ANZEIGE UNTEN
   ========================================================================== */
.portal-hud-prompt {
    margin-top: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.hud-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--cyber-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.28);
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.16);
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 640px) {
    .deco-code-left,
    .deco-lines-right {
        display: none;
    }
    .hud-badge {
        font-size: 0.68rem;
        letter-spacing: 1.5px;
    }
}