/* Universal Exploration Specific Overrides and Components */

/* Image Ritual Spotlight */
.celestial-spotlight {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: #05050a;
}
@media (min-width: 768px) {
    .celestial-spotlight { min-height: 500px; }
}

.spotlight-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.spotlight-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 1s ease, transform 10s linear;
}
.celestial-spotlight:hover .spotlight-bg img {
    opacity: 0.9;
    transform: scale(1.05);
}

.spotlight-content {
    position: absolute;
    inset: 0;
    z-index: 10;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.spotlight-content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    -webkit-mask-image: linear-gradient(to top, black 0%, black 30%, transparent 80%);
    mask-image: linear-gradient(to top, black 0%, black 30%, transparent 80%);
}

.spotlight-source {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-holo);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.spotlight-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 1rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Multi-Wavelength Spectrometer Controls */
.spectrometer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.spec-btn {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}
.spec-btn:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.spec-btn.active.layer-optical { background: rgba(255,255,255,0.2); color: #fff; border-color: #fff; }
.spec-btn.active.layer-infrared { background: rgba(255, 0, 200, 0.2); color: #ff00c8; border-color: #ff00c8; box-shadow: 0 0 10px rgba(255,0,200,0.5); }
.spec-btn.active.layer-xray { background: rgba(0, 240, 255, 0.2); color: #00f0ff; border-color: #00f0ff; box-shadow: 0 0 10px rgba(0,240,255,0.5); }
.spec-btn.active.layer-radio { background: rgba(0, 255, 100, 0.2); color: #00ff64; border-color: #00ff64; box-shadow: 0 0 10px rgba(0,255,100,0.5); }

/* Fullscreen Toggle */
.fullscreen-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(4px);
    transition: 0.3s;
}
.fullscreen-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--color-holo); color: var(--color-holo); }

/* Spectrum Image Stack */
.spectrum-stack {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.spectrum-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: screen; 
}
.spectrum-layer.optical-base {
    opacity: 1; /* Default on */
    mix-blend-mode: normal; 
}
.spectrum-layer.is-visible {
    opacity: 1;
}

/* Fullscreen Adjustments */
.celestial-spotlight:fullscreen {
    border-radius: 0;
    border: none;
}
.celestial-spotlight:fullscreen .spotlight-bg img {
    animation: slowPan 60s infinite alternate linear;
}
@keyframes slowPan {
    from { transform: scale(1.1) translateX(-2%); }
    to { transform: scale(1.1) translateX(2%); }
}

/* Telemetry Strip */
.telemetry-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 3rem;
}

.tf-left span { color: var(--color-holo); margin-right: 0.5rem; }
.tf-right { opacity: 0.7; }

/* Intelligence Dashboard */
.intel-dashboard {
    background: rgba(0, 5, 10, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-mono);
}

.intel-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.intel-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--color-holo);
}

.intel-timer {
    font-size: 0.65rem;
    opacity: 0.6;
}

.intel-logs {
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.intel-console-grid {
    display: grid;
    grid-template-columns: 1fr;
    background: rgba(0,0,0,0.3);
}

@media (min-width: 992px) {
    .intel-console-grid {
        grid-template-columns: 1fr 350px;
        height: 400px;
    }
}

.intel-visual-pane {
    position: relative;
    background: #000;
    overflow: hidden;
    aspect-ratio: 16/9;
}

@media (min-width: 992px) {
    .intel-visual-pane {
        aspect-ratio: auto;
        height: 100%;
        border-right: 1px solid rgba(255,255,255,0.05);
    }
}

.video-container {
    width: 100%;
    height: 100%;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    transform: scale(1.05); /* Slight zoom to hide YouTube UI edges if needed */
}

.intel-data-pane {
    display: flex;
    flex-direction: column;
    height: 250px; /* Mobile height */
}

@media (min-width: 992px) {
    .intel-data-pane {
        height: 100%;
    }
}

.pane-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.4rem 1rem;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255,255,255,0.4);
}

.pane-overlay {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    pointer-events: none;
    z-index: 5;
}

.overlay-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-holo);
    background: rgba(0,0,0,0.5);
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    letter-spacing: 0.1em;
    border-left: 2px solid var(--color-holo);
}

.intel-log-entry {
    margin-bottom: 0.4rem;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    transition: 0.3s;
}

.intel-log-entry:hover {
    border-left-color: var(--color-holo);
    color: #fff;
}

/* Mission Pulse Cards */
.pulse-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .pulse-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

.pulse-card-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    z-index: -1;
    opacity: 0.4;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    transition: 0.5s;
}

.pulse-card:hover .pulse-card-banner {
    opacity: 0.8;
    height: 120px;
}

.pulse-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pulse-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(0, 5, 10, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.pulse-card:hover { transform: scale(1.02); }
.pulse-card.color-holo { border-color: rgba(0, 240, 255, 0.2); }
.pulse-card.color-holo:hover { box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 10px rgba(0, 240, 255, 0.05); }
.pulse-card.color-nebula { border-color: rgba(176, 38, 255, 0.2); }
.pulse-card.color-nebula:hover { box-shadow: 0 0 20px rgba(176, 38, 255, 0.15), inset 0 0 10px rgba(176, 38, 255, 0.05); }
.pulse-card.color-pink { border-color: rgba(255, 107, 181, 0.2); }
.pulse-card.color-pink:hover { box-shadow: 0 0 20px rgba(255, 107, 181, 0.15), inset 0 0 10px rgba(255, 107, 181, 0.05); }

.pulse-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.pulse-title-group h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.pulse-title-group p {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.pulse-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(0,0,0,0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.color-holo .pulse-status { color: var(--color-holo); }
.color-nebula .pulse-status { color: var(--color-nebula); }
.color-pink .pulse-status { color: var(--color-star-pink); }

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: blinkingDot 2s infinite;
}
.color-holo .pulse-dot { background: var(--color-holo); box-shadow: 0 0 5px var(--color-holo); }
.color-nebula .pulse-dot { background: var(--color-nebula); box-shadow: 0 0 5px var(--color-nebula); }
.color-pink .pulse-dot { background: var(--color-star-pink); box-shadow: 0 0 5px var(--color-star-pink); }

.pulse-body {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Simulation Launch Panels */
.portal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .portal-grid { grid-template-columns: repeat(3, 1fr); }
}

.launch-portal {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    min-height: 220px;
    transition: 0.3s;
}
.launch-portal h3 { margin: 0 0 1rem; font-size: 1.125rem; }
.launch-portal p { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 2rem; flex: 1; }
.launch-action {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    transition: 0.3s;
}
.launch-portal.color-holo .launch-action { color: var(--color-holo); }
.launch-portal.color-nebula .launch-action { color: var(--color-nebula); }
.launch-portal.color-pink .launch-action { color: var(--color-star-pink); }

.launch-portal:hover .launch-action { gap: 1rem; }

/* Text Scramble Effect Class */
.scramble-text {
    font-variant-numeric: tabular-nums;
}
