/**
 * OrbiSky v2 - Satellite Flyover Styles
 * CSS für Satelliten-Überflug Beobachtungs-Slide
 *
 * Unterstützte Satelliten:
 * - ISS (blau)
 * - Tiangong (orange)
 * - Hubble (violett)
 * - Crew Dragon (weiß/silber)
 *
 * Redesign: Schönes, informatives Layout für Laien
 * - Große, klare Typografie
 * - Sanfte Animationen
 * - Verständliche Informationen
 */

/* ============= ISS Flyover Container ============= */

.layout-iss-flyover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Eleganter Nachthimmel-Gradient */
    background:
        radial-gradient(ellipse at 30% 20%, rgba(40, 80, 160, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(80, 50, 140, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 40, 80, 0.3) 0%, transparent 70%),
        linear-gradient(180deg, #030810 0%, #0a1628 40%, #0c1a30 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--margin-screen);
    box-sizing: border-box;
    z-index: 100;
    opacity: 0;
    transition: opacity 1.2s ease;
    overflow: hidden;
}

.layout-iss-flyover.visible {
    opacity: 1;
}

.layout-iss-flyover.hidden {
    display: none;
}

/* ============= Animierte Sterne (subtiler) ============= */

.layout-iss-flyover .flyover-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* Helle Sterne */
        radial-gradient(2px 2px at 8% 15%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(2px 2px at 25% 40%, rgba(200,220,255,0.85) 0%, transparent 100%),
        radial-gradient(2px 2px at 72% 22%, rgba(255,240,200,0.8) 0%, transparent 100%),
        radial-gradient(2px 2px at 88% 65%, rgba(200,220,255,0.85) 0%, transparent 100%),
        /* Mittlere Sterne */
        radial-gradient(1.5px 1.5px at 15% 70%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 45% 12%, rgba(255,255,255,0.65) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 60% 85%, rgba(255,255,255,0.7) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 92% 35%, rgba(255,255,255,0.6) 0%, transparent 100%),
        /* Kleine Sterne */
        radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 75%, rgba(255,255,255,0.45) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 78% 48%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 18% 88%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 5%, rgba(255,255,255,0.45) 0%, transparent 100%);
    animation: flyoverStarsTwinkle 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes flyoverStarsTwinkle {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ============= Hauptinhalt ============= */

.layout-iss-flyover .flyover-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 90%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
}

/* ============= Alert-Badge ============= */

.layout-iss-flyover .flyover-alert-badge {
    /* Elegantes Gold mit Glow */
    background: linear-gradient(135deg, #c9a227 0%, #e8c547 40%, #d4af37 60%, #b8962a 100%);
    color: #1a1510;
    /* 1.6em = 26px - etwas kleiner für Eleganz */
    font-size: 1.6em;
    font-weight: 700;
    padding: 0.5em 1.5em;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    box-shadow:
        0 4px 20px rgba(212, 175, 55, 0.4),
        0 0 40px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: flyoverBadgeGlow 3s ease-in-out infinite;
}

@keyframes flyoverBadgeGlow {
    0%, 100% {
        box-shadow:
            0 4px 20px rgba(212, 175, 55, 0.4),
            0 0 40px rgba(212, 175, 55, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 6px 30px rgba(212, 175, 55, 0.5),
            0 0 60px rgba(212, 175, 55, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

/* Badge im "Jetzt!"-Modus - intensiveres Pulsieren */
.layout-iss-flyover .flyover-alert-badge.now {
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 50%, #16a34a 100%);
    color: #052e16;
    animation: flyoverBadgeNow 1.5s ease-in-out infinite;
}

@keyframes flyoverBadgeNow {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 4px 25px rgba(34, 197, 94, 0.5),
            0 0 50px rgba(34, 197, 94, 0.2);
    }
    50% {
        transform: scale(1.04);
        box-shadow:
            0 6px 35px rgba(34, 197, 94, 0.7),
            0 0 80px rgba(34, 197, 94, 0.3);
    }
}

/* ============= Headline ============= */

.layout-iss-flyover .flyover-headline {
    /* 3.5em = 56px - etwas kleiner für Balance */
    font-size: 3.5em;
    font-weight: 600;
    color: #ffffff;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(100, 200, 255, 0.2);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

/* Satellitenname in Akzentfarbe */
.layout-iss-flyover .flyover-headline .iss-accent {
    color: #64c8ff;
    text-shadow:
        0 0 20px rgba(100, 200, 255, 0.5),
        0 0 40px rgba(100, 200, 255, 0.3);
}

/* Tiangong in Orange */
.layout-iss-flyover[data-satellite="tiangong"] .flyover-headline .iss-accent {
    color: #ffa500;
    text-shadow:
        0 0 20px rgba(255, 165, 0, 0.5),
        0 0 40px rgba(255, 165, 0, 0.3);
}

/* Hubble in Violett */
.layout-iss-flyover[data-satellite="hubble"] .flyover-headline .iss-accent {
    color: #a855f7;
    text-shadow:
        0 0 20px rgba(168, 85, 247, 0.5),
        0 0 40px rgba(168, 85, 247, 0.3);
}

.layout-iss-flyover[data-satellite="hubble"] .flyover-trajectory .arrow,
.layout-iss-flyover[data-satellite="hubble"] .flyover-position .position-label,
.layout-iss-flyover[data-satellite="hubble"] .flyover-farewell .farewell-accent,
.layout-iss-flyover[data-satellite="hubble"] .flyover-info-bar .orbisky-brand .accent {
    color: #a855f7;
}

.layout-iss-flyover[data-satellite="hubble"] .flyover-position {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.2);
}

.layout-iss-flyover[data-satellite="hubble"] .iss-animation .iss-icon {
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.6));
}

/* Crew Dragon in Weiß/Silber */
.layout-iss-flyover[data-satellite="dragon"] .flyover-headline .iss-accent {
    color: #e2e8f0;
    text-shadow:
        0 0 20px rgba(226, 232, 240, 0.5),
        0 0 40px rgba(226, 232, 240, 0.3);
}

.layout-iss-flyover[data-satellite="dragon"] .flyover-trajectory .arrow,
.layout-iss-flyover[data-satellite="dragon"] .flyover-position .position-label,
.layout-iss-flyover[data-satellite="dragon"] .flyover-farewell .farewell-accent,
.layout-iss-flyover[data-satellite="dragon"] .flyover-info-bar .orbisky-brand .accent {
    color: #e2e8f0;
}

.layout-iss-flyover[data-satellite="dragon"] .flyover-position {
    background: rgba(226, 232, 240, 0.08);
    border-color: rgba(226, 232, 240, 0.2);
}

.layout-iss-flyover[data-satellite="dragon"] .iss-animation .iss-icon {
    filter: drop-shadow(0 0 15px rgba(226, 232, 240, 0.6));
}

/* ============= Subline (Countdown) ============= */

.layout-iss-flyover .flyover-subline {
    /* 2.2em = 35px */
    font-size: 2.2em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

/* Countdown-Stil */
.layout-iss-flyover .flyover-subline.countdown {
    color: #fbbf24;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow:
        0 0 15px rgba(251, 191, 36, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.5);
}

/* "Jetzt sichtbar" Stil */
.layout-iss-flyover .flyover-subline.now-visible {
    color: #4ade80;
    font-weight: 600;
    animation: flyoverNowPulse 2s ease-in-out infinite;
}

@keyframes flyoverNowPulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
    }
    50% {
        opacity: 0.85;
        text-shadow: 0 0 25px rgba(74, 222, 128, 0.7);
    }
}

/* ============= Trajektorie (Flugbahn) ============= */

.layout-iss-flyover .flyover-trajectory {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    /* 1.6em = 26px */
    font-size: 1.6em;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6em 1.5em;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.layout-iss-flyover .flyover-trajectory .direction {
    font-weight: 500;
    color: #ffffff;
}

.layout-iss-flyover .flyover-trajectory .arrow {
    color: #64c8ff;
    font-size: 1.2em;
    opacity: 0.9;
}

/* ============= Details Grid (Höhe, Dauer, Helligkeit) ============= */

.layout-iss-flyover .flyover-details {
    display: flex;
    justify-content: center;
    gap: 2.5em;
    margin-top: 1vh;
}

.layout-iss-flyover .flyover-details .detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3em;
}

.layout-iss-flyover .flyover-details .detail-icon {
    /* 1.8em = 29px */
    font-size: 1.8em;
    opacity: 0.85;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.layout-iss-flyover .flyover-details .detail-item span:last-child {
    /* 1.3em = 21px */
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Detail-Labels (für besseres Verständnis) */
.layout-iss-flyover .flyover-details .detail-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.2em;
}

/* ============= Position Info (während Überflug) ============= */

.layout-iss-flyover .flyover-position {
    margin-top: 2vh;
    padding: 1em 2em;
    background: rgba(100, 200, 255, 0.08);
    border: 1px solid rgba(100, 200, 255, 0.2);
    border-radius: 16px;
    /* 1.3em = 21px */
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.layout-iss-flyover .flyover-position:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.layout-iss-flyover .flyover-position .position-label {
    color: #64c8ff;
    font-weight: 600;
    margin-right: 0.5em;
}

/* ============= Farewell (Guten Flug) ============= */

.layout-iss-flyover .flyover-farewell {
    margin-top: 2vh;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.layout-iss-flyover .flyover-farewell.visible {
    opacity: 1;
    transform: translateY(0);
}

.layout-iss-flyover .flyover-farewell .farewell-text {
    /* 1.8em = 29px */
    font-size: 1.8em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.layout-iss-flyover .flyover-farewell .farewell-accent {
    color: #64c8ff;
    font-weight: 600;
}

/* ============= Info-Bar unten ============= */

.layout-iss-flyover .flyover-info-bar {
    position: absolute;
    bottom: 4vh;
    left: 5vw;
    right: 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 1.3em = 21px */
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.6);
    z-index: 20;
}

.layout-iss-flyover .flyover-info-bar .location-name {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.layout-iss-flyover .flyover-info-bar .orbisky-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.layout-iss-flyover .flyover-info-bar .orbisky-brand .accent {
    color: #64c8ff;
}

/* ============= ISS-Animation (fahrende ISS) ============= */

.layout-iss-flyover .iss-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.layout-iss-flyover .iss-animation .iss-icon {
    position: absolute;
    /* 2.5em = 40px - etwas kleiner */
    font-size: 2.5em;
    filter: drop-shadow(0 0 15px rgba(100, 200, 255, 0.6));
    animation: issTraverse 25s linear infinite;
    opacity: 0.8;
}

@keyframes issTraverse {
    0% {
        left: -8%;
        top: 65%;
        opacity: 0;
    }
    8% {
        opacity: 0.8;
    }
    50% {
        left: 50%;
        top: 25%;
    }
    92% {
        opacity: 0.8;
    }
    100% {
        left: 108%;
        top: 45%;
        opacity: 0;
    }
}

/* ============= Helligkeits-Indikator (optional) ============= */

.layout-iss-flyover .brightness-indicator {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.layout-iss-flyover .brightness-indicator .star {
    font-size: 0.9em;
    color: #fbbf24;
}

.layout-iss-flyover .brightness-indicator .star.dim {
    opacity: 0.3;
}

/* ============= Responsive Anpassungen ============= */

/* Kleinere Displays (unter 720px Breite) */
@media (max-width: 720px) {
    .layout-iss-flyover .flyover-headline {
        font-size: 2.8em;
    }

    .layout-iss-flyover .flyover-subline {
        font-size: 1.8em;
    }

    .layout-iss-flyover .flyover-trajectory {
        font-size: 1.4em;
        flex-wrap: wrap;
    }

    .layout-iss-flyover .flyover-details {
        gap: 1.5em;
    }
}
