/**
 * OrbiSky v2 - Debris Globe Styles
 *
 * 3D-Globus mit Weltraumschrott und Kategorien
 * Farbschema: Rot für Debris/Gefahr, Blau für Aktive
 */

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

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

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

#debris-globe.fade-out {
    opacity: 0;
    pointer-events: none;
}

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

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

/* ============= Text-Overlay (wie ISS Day / Aurora) ============= */

#debris-globe .debris-globe-text-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, 136, 0, 0.4), 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;
}

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

/* ============= Positionsklassen (wie ISS Overlay) ============= */

#debris-globe .debris-globe-text-overlay.pos-bottom-left {
    bottom: var(--margin-screen-v, 60px);
    left: var(--margin-screen, 60px);
    right: auto;
    top: auto;
    transform: none;
    text-align: left;
}

#debris-globe .debris-globe-text-overlay.pos-bottom-right {
    bottom: var(--margin-screen-v, 60px);
    right: var(--margin-screen, 60px);
    left: auto;
    top: auto;
    transform: none;
    text-align: right;
}

#debris-globe .debris-globe-text-overlay.pos-bottom-center {
    bottom: var(--margin-screen-v, 60px);
    left: var(--margin-screen, 60px);
    right: var(--margin-screen, 60px);
    top: auto;
    width: calc(100% - 8vw);
    text-align: center;
}

/* ============= Overlay-Elemente (wie ISS Day) ============= */
/* Direkter Text im Container, <strong> für Hervorhebungen, <br> für Umbrüche */

/* Akzent für Strong - Rot/Orange für Debris-Thema */
#debris-globe .debris-globe-text-overlay strong {
    color: #ff8800;
}

/* Subtext (Untertitel unter <strong>) */
#debris-globe .debris-globe-text-overlay .subtext {
    font-size: 0.75em;
    font-weight: var(--font-weight-normal, 400);
    color: rgba(255, 255, 255, 0.8);
}

/* Gedämpfter Text */
#debris-globe .debris-globe-text-overlay .text-muted {
    font-size: 0.7em;
    font-weight: var(--font-weight-normal, 400);
    color: rgba(255, 255, 255, 0.6);
}

/* ============= Info Counters ============= */

.debris-globe-info {
    position: absolute;
    z-index: 14;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.debris-globe-info.visible {
    opacity: 1;
}

.debris-globe-info .count {
    font-size: 2.2em;
    font-weight: var(--font-weight-bold, 700);
    line-height: 1.1;
    display: block;
}

.debris-globe-info .label {
    font-size: 1em;
    font-weight: var(--font-weight-semibold, 600);
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-top: 2px;
}

/* Counter Positionen */

#debris-globe .debris-info {
    top: var(--margin-screen-v, 60px);
    left: var(--margin-screen, 60px);
}

#debris-globe .debris-info .count {
    color: #ff8800;
}

#debris-globe .outofcontrol-info {
    top: var(--margin-screen-v, 60px);
    right: var(--margin-screen, 60px);
}

#debris-globe .outofcontrol-info .count {
    color: #cc2222;
}

#debris-globe .crashing-info {
    bottom: calc(var(--margin-screen-v, 60px) + 180px);
    right: var(--margin-screen, 60px);
}

#debris-globe .crashing-info .count {
    color: #ff8800;
}

#debris-globe .active-info {
    bottom: calc(var(--margin-screen-v, 60px) + 180px);
    left: var(--margin-screen, 60px);
}

#debris-globe .active-info .count {
    color: #66aaff;
}

/* ============= Legende ============= */

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

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

#debris-globe-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
}

#debris-globe-legend .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

#debris-globe-legend .legend-dot.debris {
    background: #ff8800;
}

#debris-globe-legend .legend-dot.outofcontrol {
    background: #cc2222;
    animation: blink 1.5s ease-in-out infinite;
}

#debris-globe-legend .legend-dot.crashing {
    background: #ff8800;
    animation: pulse 1.5s ease-in-out infinite;
}

#debris-globe-legend .legend-dot.active {
    background: #66aaff;
}

#debris-globe-legend .legend-label {
    font-size: 1em;
    font-weight: var(--font-weight-semibold, 600);
    color: rgba(255, 255, 255, 0.85);
}

/* ============= LIVE Badge ============= */

.debris-live-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, 34, 34, 0.6);
    animation: debris-badge-pulse 1.5s ease-in-out infinite;
    will-change: transform, opacity;
}

.debris-live-badge .badge-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0 0.9em;
    background: #ff2222;
}

.debris-live-badge .badge-brand {
    font-size: 0.85em;
    font-weight: var(--font-weight-bold, 700);
    padding: 0.25em 0.9em;
    background: rgba(255, 34, 34, 0.2);
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
}

.debris-live-badge .badge-brand .text-white {
    color: #ffffff;
}

.debris-live-badge .badge-brand .accent {
    color: #ff2222;
}

.debris-live-badge .globe-live-dot {
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    background: #fff;
    border-radius: 50%;
    animation: debris-dot-pulse 1s infinite;
    will-change: transform, opacity;
}

.debris-live-badge .globe-live-text {
    font-size: var(--font-size-normal, 1.4em);
    font-weight: var(--font-weight-bold, 700);
    color: #fff;
    letter-spacing: 0.1em;
}

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

@keyframes debris-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* ============= Branding ============= */

.debris-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);
}

.debris-globe-brand .text-white {
    color: #ffffff;
}

.debris-globe-brand .accent {
    color: #ff2222;
}

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

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes blink-red-white {
    0%, 100% {
        color: #ff0000;
    }
    50% {
        color: #ffffff;
    }
}

#debris-globe .debris-globe-text-overlay.blink-red-white strong {
    animation: blink-red-white 0.3s step-end infinite;
}

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

/* ============= Responsive (720px Displays) ============= */
/* KEINE font-size Änderung - fester Wert 2.0em auf allen Größen */
/* Nur Margins werden angepasst (automatisch via CSS-Variablen) */
