/**
 * OrbiSky v2 - Fireball Globe Styles
 *
 * 3D-Globus mit NASA JPL Feuerkugeln / Meteoriteneinschlägen.
 * Farbschema: Orange/Gelb/Rot für Einschlagsenergie.
 */

/* ============= Globe Container ============= */

#fireball-globe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #040202 0%, #0a0404 50%, #040202 100%);
    display: block;
    z-index: var(--z-content, 100);
    opacity: 1;
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#fireball-globe.layout-fireball-globe {
    z-index: var(--z-content, 100);
}

#fireball-globe.layout-fireball-globe.transitioning-in {
    z-index: calc(var(--z-content, 100) + 1);
}

#fireball-globe.hidden {
    display: none !important;
}

#fireball-globe.fade-out {
    opacity: 0 !important;
    pointer-events: none;
}

/* ============= Canvas ============= */

#fireball-globe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    will-change: contents;
}

/* ============= Text-Overlay ============= */

#fireball-globe-overlay {
    position: absolute;
    bottom: var(--margin-screen-v, 60px);
    left: var(--margin-screen, 60px);
    max-width: 92%;
    padding: 0 4%;
    box-sizing: border-box;
    z-index: 15;
    font-size: 2.0em;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text, #ffffff);
    text-shadow:
        0 2px 15px rgba(255, 100, 0, 0.5),
        var(--shadow-text, 0 2px 10px rgba(0, 0, 0, 0.7));
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
}

#fireball-globe-overlay.visible {
    opacity: 1;
}

#fireball-globe-overlay strong {
    color: #FF8800;
}

#fireball-globe-overlay .subtext {
    font-size: 0.72em;
    font-weight: var(--font-weight-normal, 400);
    color: rgba(255, 255, 255, 0.8);
}

/* ============= Energie-Zähler (oben rechts) ============= */

#fireball-globe-count-box {
    position: absolute;
    top: var(--margin-screen-v, 60px);
    left: var(--margin-screen, 60px);
    z-index: 14;
    pointer-events: none;
}

#fireball-globe-count {
    display: block;
    font-size: 3.0em;
    font-weight: var(--font-weight-bold, 700);
    color: #FF8800;
    line-height: 1.0;
    text-shadow: 0 0 20px rgba(255, 100, 0, 0.8);
}

#fireball-globe-count-label {
    display: block;
    font-size: 1.0em;
    font-weight: var(--font-weight-semibold, 600);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 3px;
    letter-spacing: 0.05em;
}

/* ============= Energie-Legende (rechts mittig) ============= */

#fireball-globe-legend {
    position: absolute;
    top: 50%;
    right: var(--margin-screen, 60px);
    transform: translateY(-50%);
    z-index: 14;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

#fireball-globe-legend.visible {
    opacity: 1;
}

.fireball-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fireball-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fireball-legend-dot.mega   { background: #FFEE88; box-shadow: 0 0 8px #FFEE88; animation: fireball-pulse 1.5s ease-in-out infinite; }
.fireball-legend-dot.large  { background: #FF8800; box-shadow: 0 0 6px #FF8800; animation: fireball-pulse 2s ease-in-out infinite; }
.fireball-legend-dot.medium { background: #FFCC00; }
.fireball-legend-dot.small  { background: #FF5500; }
.fireball-legend-dot.tiny   { background: #993300; }

.fireball-legend-label {
    font-size: 0.85em;
    font-weight: var(--font-weight-semibold, 600);
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

/* ============= NASA Badge (oben rechts) ============= */

.fireball-nasa-badge {
    position: absolute;
    top: var(--margin-screen-v, 60px);
    right: var(--margin-screen, 60px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 20;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.fireball-nasa-badge .badge-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.4em 0.9em;
    background: rgba(255, 80, 0, 0.85);
    font-size: var(--font-size-normal, 1.4em);
    font-weight: var(--font-weight-bold, 700);
    color: #fff;
    letter-spacing: 0.08em;
}

.fireball-nasa-badge .badge-sub {
    font-size: 0.8em;
    font-weight: var(--font-weight-semibold, 600);
    padding: 0.25em 0.9em;
    background: rgba(255, 80, 0, 0.2);
    text-align: center;
    color: rgba(255, 220, 180, 0.9);
    letter-spacing: 0.04em;
}

/* ============= Branding (oben Mitte) ============= */

.fireball-globe-brand {
    position: absolute;
    top: var(--margin-screen-v, 60px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4em;
    font-weight: var(--font-weight-bold, 700);
    z-index: 14;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.fireball-globe-brand .text-white { color: #ffffff; }
.fireball-globe-brand .accent     { color: #FF6600; }

/* ============= Zoom-Labels (Einschlag-Beschriftungen im Zoom-Finale) ============= */

.fireball-zoom-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 18;
}

/* Ankerpunkt am Einschlags-Screenpos */
.fireball-zoom-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #FF8800;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px #FF6600, 0 0 12px rgba(255,100,0,0.5);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fireball-zoom-dot.closest {
    width: 7px;
    height: 7px;
    background: #FFCC00;
    box-shadow: 0 0 10px #FFCC00, 0 0 20px rgba(255,200,0,0.6);
}

.fireball-zoom-dot.visible {
    opacity: 1;
}

/* Label-Box oberhalb des Ankerpunktes */
.fireball-zoom-label {
    position: absolute;
    transform: translate(-50%, calc(-100% - 10px));
    background: rgba(8, 16, 32, 0.88);
    border: 1px solid rgba(255, 120, 0, 0.65);
    border-radius: 4px;
    padding: 6px 11px;
    font-family: var(--font-mono, 'Courier New', monospace);
    font-size: 13px;
    line-height: 1.5;
    color: #FF9933;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.fireball-zoom-label.closest {
    font-size: 15px;
    border-color: rgba(255, 220, 0, 0.80);
    color: #FFCC00;
    background: rgba(8, 16, 32, 0.92);
    box-shadow: 0 0 16px rgba(255, 180, 0, 0.35);
}

.fireball-zoom-label.visible {
    opacity: 1;
}

/* Verbindungsstrich: kleines ↓ unter dem Label */
.fireball-zoom-label::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 9px;
    background: currentColor;
    opacity: 0.5;
}

/* Einzelne Zeilen im Label */
.fzl-date {
    font-weight: 700;
    color: inherit;
    letter-spacing: 0.02em;
}

.fzl-energy {
    color: inherit;
    opacity: 0.9;
}

.fzl-location {
    color: rgba(160, 200, 255, 0.85);
    font-size: 0.88em;
}

.fzl-coords {
    color: rgba(120, 160, 200, 0.65);
    font-size: 0.82em;
}

.fzl-dist {
    color: rgba(255, 200, 80, 0.75);
    font-size: 0.82em;
    margin-top: 1px;
}

/* ============= Animationen ============= */

@keyframes fireball-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.85; }
    50%       { transform: scale(1.4); opacity: 1;    }
}
