/* =====================================================
   TRAILERMACHINE INTRO SCREEN (3:4 FRAME)
   Zwei Grafiken + enter.png als Button
   ===================================================== */

/* Globale Intro-Variablen zum Feintuning */
:root {
    /* Größe / Skalierung */
    --intro-max-vw: 90vw;
    --intro-max-vh: 90vh;

    /* Frame-Look – dynamische Eckrundung */
    --intro-frame-radius: clamp(8px, 4vw, 40px);
    --intro-frame-border-width: 2px;
    --intro-frame-border-color: #c7c9cf;
    --intro-frame-bg: #050911;
    --intro-frame-shadow: 0 0 32px rgba(0, 0, 0, 0.92);

    /* Hintergrund / Farbbalken */
    --intro-bg-gradient: radial-gradient(circle at top, #252a38, #050910 55%, #020308 100%);
    --intro-bars-opacity: 1;
    --intro-bars-blur: 0px;

    /* Hauptbild (oben) – Abstand kannst du hier tunen */
    --intro-image-max-width: 95%;
    --intro-image-max-height: 95%;
    --intro-image-margin-top: 0.0rem;
    --intro-image-margin-bottom: 0.3rem;

    /* Unteres Bild – Abstand nach unten */
    --intro-image2-max-width: 90%;
    --intro-image2-max-height: 90%;
    --intro-image2-margin-top: 0.3rem;
    --intro-image2-margin-bottom: 1rem;

    /* ENTER PNG – Größe, Position & Rahmen */
    --intro-enter-max-width: 100%;
    --intro-enter-max-height: 100%;
    --intro-enter-pos-top: 76%;

    --intro-enter-border-width: 3px;
    --intro-enter-border-color: #ffffff;
    --intro-enter-border-radius: 999px;

    /* Overlay */
    --intro-overlay-bg: radial-gradient(circle at top, rgba(37, 42, 56, 0.96), rgba(0, 0, 0, 0.90));
}

/* Browser-Fix für mobile Browser */
@supports (height: 100dvh) {
    :root {
        --intro-max-vh: 90dvh;
    }
}

/* Vollbild Intro Overlay */
.intro-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--intro-overlay-bg);
    z-index: 9999;
    padding: 1.5rem;
}

/* 3:4 Frame */
.intro-frame {
    position: relative;
    width: min(var(--intro-max-vw), calc(var(--intro-max-vh) * 3 / 4));
    aspect-ratio: 3 / 4;
    max-height: var(--intro-max-vh);

    border-radius: var(--intro-frame-radius);
    border: var(--intro-frame-border-width) solid var(--intro-frame-border-color);
    background: var(--intro-frame-bg);
    box-shadow: var(--intro-frame-shadow);
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between; /* OBERES Bild nach oben, UNTERES nach unten */
    align-items: center;
}

/* Hintergrund */
.intro-bg {
    position: absolute;
    inset: 0;
    background: var(--intro-bg-gradient);
    z-index: 0;
}

/* Farbbalken */
.intro-bg::before {
    content: "";
    position: absolute;
    inset: -40%;
    background-image: linear-gradient(
        135deg,
        transparent 0 55%,
        #ffcc33 55% 59%,
        #ff9933 59% 63%,
        #ff3360 63% 67%,
        #d620b0 67% 71%,
        #7b3cff 71% 75%,
        #0078ff 75% 79%,
        transparent 79% 100%
    );
    opacity: var(--intro-bars-opacity);
    filter: blur(var(--intro-bars-blur));
    pointer-events: none;
}

/* Wrapper für beide Grafiken */
.intro-image-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* keine flex-grow/-shrink hier, wird über justify-content im Frame geregelt */
}

/* OBERES Bild – hängt am oberen Rand des Frames */
.intro-image-top {
    /* kein flex, kein padding-top */
}

.intro-image-main {
    max-width: var(--intro-image-max-width);
    max-height: var(--intro-image-max-height);
    object-fit: contain;
    margin-top: var(--intro-image-margin-top);
    margin-bottom: var(--intro-image-margin-bottom);
    filter:
        drop-shadow(0 0 12px rgba(0, 0, 0, 0.9))
        drop-shadow(0 0 22px rgba(0, 0, 0, 0.75));
}

/* UNTERES Bild – hängt am unteren Rand des Frames */
.intro-image-bottom {
    /* sitzt durch justify-content:space-between automatisch unten */
}

.intro-image-footer {
    max-width: var(--intro-image2-max-width);
    max-height: var(--intro-image2-max-height);
    object-fit: contain;
    margin-top: var(--intro-image2-margin-top);
    margin-bottom: var(--intro-image2-margin-bottom);
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.6));
}

/* ENTER Button (Container) */
.intro-enter-btn {
    position: absolute;
    left: 50%;
    top: var(--intro-enter-pos-top);
    transform: translateX(-50%);
    z-index: 3;

    background: none;
    border: none;
    padding: 0;
    margin: 0;

    width: auto;
    height: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

/* ENTER PNG mit Rahmen */
.intro-enter-image {
    display: block;
    max-width: var(--intro-enter-max-width);
    max-height: var(--intro-enter-max-height);
    width: auto;
    height: auto;

    border: var(--intro-enter-border-width) solid var(--intro-enter-border-color);
    border-radius: var(--intro-enter-border-radius);
    padding: 0.2rem;

    background-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.8));
    transition:
        transform 0.12s ease-out,
        filter 0.12s ease-out;
}

/* Hover-Effekt */
.intro-enter-btn:hover .intro-enter-image {
    transform: scale(1.03);
    filter:
        brightness(1)
        saturate(1)
        hue-rotate(340deg)
        drop-shadow(0 0 14px rgba(0,0,0,0.9));
}

/* Klick-Effekt */
.intro-enter-btn:active .intro-enter-image {
    transform: scale(0.97) translateY(1px);
    filter:
        brightness(0.95)
        drop-shadow(0 0 8px rgba(0,0,0,0.8));
}

/* Tastatur-Fokus */
.intro-enter-btn:focus-visible .intro-enter-image {
    outline: 2px solid rgba(159, 255, 138, 0.95);
    outline-offset: 4px;
}

/* Mobile Portrait */
@media (max-width: 600px) {
    .intro-screen {
        padding: 0.8rem;
    }
}

/* Embedded Mode */
body.is-embedded .intro-screen {
    display: none !important;
}
