/* Monochrome Replacements */
.detail-value {
    color: #fff;
}

.encounter-item {
    border-left: 2px solid #fff;
}

.risk-high {
    color: #fff;
    border-left: 3px solid #fff;
}

.risk-med {
    color: #eee;
    border-left: 3px solid #ccc;
}

.risk-low {
    color: #aaa;
    border-left: 3px solid #666;
}

.log-pre {
    color: #ccc;
}

.log-success {
    color: #fff;
}

.log-warn {
    color: #ddd;
}

.log-info {
    color: #bbb;
}

.log-norm {
    color: #888;
}

.landing-header nav .nav-cta {
    color: #fff;
    border: 1px solid #333;
}

/* Any other accent colors to #fff or #ccc */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=IBM+Plex+Mono:wght@400;600&display=swap');

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: #e0e0e0;
    overflow: hidden;
}

#globe-container {
    width: 100vw;
    height: 80vh;
    /* User requested 80% height */
    position: absolute;
    top: 10vh;
    /* Center vertically (10% top + 80% height + 10% bottom) */
    left: 0;
    z-index: 1;
    pointer-events: auto;
    /* Ensure it receives events */
}

#globe-container canvas {
    display: block;
    pointer-events: auto;
}

#app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

/* Ensure child controls catch pointer events */
.control-group,
#stats,
.cdm-dropdown {
    pointer-events: auto;
}

/* --- Layout Containers --- */
#ui-left {
    position: absolute;
    top: 50px;
    left: 20px;
    z-index: 10;
    width: 320px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid #333;
    padding: 20px;
    pointer-events: auto;
}

#ui-center {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    z-index: 10;
    pointer-events: auto;
}

#ui-right {
    position: absolute;
    top: 50px;
    right: 20px;
    z-index: 10;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align header to right */
    pointer-events: none;
}

#ui-right>* {
    pointer-events: auto;
}

/* Override satellite details to flow in column */
#satellite-details {
    position: relative !important;
    /* Override absolute if set */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100%;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid #333;
    padding: 15px;
    text-align: left;
}

h1 {
    margin-top: 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 300;
    color: #fff;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.control-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="range"] {
    width: 100%;
    /* Custom range styling could be added here */
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
    border-color: #fff;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    border: 1px solid #333;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-result-item {
    padding: 8px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    border-bottom: 1px solid #111;
    color: #888;
}

.search-result-item:hover {
    background: #111;
    color: #fff;
}

.btn-group {
    display: flex;
    border: 1px solid #333;
    gap: 0;
    /* Connected buttons */
}

button {
    background: #000;
    color: #888;
    border: none;
    border-right: 1px solid #333;
    padding: 8px 12px;
    cursor: pointer;
    flex: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    transition: background 0.2s, color 0.2s;
}

button:last-child {
    border-right: none;
}

button.active,
button:hover {
    background: #fff;
    color: #000;
}

#stats {
    margin-top: 20px;
    border-top: 1px solid #222;
    padding-top: 15px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #555;
    line-height: 1.6;
}

#stats span {
    color: #fff;
    font-weight: 600;
}

#tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.2s;
}

.hidden {
    opacity: 0;
    display: none;
}

#satellite-details {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 280px;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 20px;
    z-index: 20;
    max-height: 80vh;
    overflow-y: auto;
}

#satellite-details h2 {
    margin-top: 0;
    color: #fff;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
}

.detail-label {
    color: #555;
    text-transform: uppercase;
}

.detail-value {
    color: #fff;
    /* Keep white for data values */
}

.encounter-list {
    margin-top: 20px;
    border-top: 1px solid #222;
    padding-top: 10px;
}

.encounter-item {
    background: #050505;
    padding: 10px;
    margin-bottom: 5px;
    border-left: 2px solid #f00;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #aaa;
}

#cdm-sidebar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 0;
    z-index: 200;
    max-height: 50vh;
    display: none;
    flex-direction: column;
    margin-top: 10px;
}

.cdm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #111;
    border-bottom: 1px solid #333;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 10;
    /* Ensure clickability */
}

.close-btn:hover {
    color: #f00;
}

#cdm-sidebar.visible {
    display: flex;
}

.table-container {
    overflow-y: auto;
    flex: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
}

th,
td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #222;
}

th {
    color: #555;
    position: sticky;
    top: 0;
    background: #000;
    font-weight: 400;
    text-transform: uppercase;
}

td {
    color: #aaa;
}

tr:hover {
    background: #111;
    cursor: pointer;
    color: #fff;
}

.risk-high {
    color: #fff;
    border-left: 3px solid #fff;
}

.risk-med {
    color: #eee;
    border-left: 3px solid #ccc;
}

.risk-low {
    color: #aaa;
    border-left: 3px solid #888;
}

#cdm-sidebar h2 {
    /* Legacy header style override or remove */
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1rem;
}

/* Modal Styles updated to Minimalist */
#log-modal-overlay,
.modal-overlay {
    background: rgba(0, 0, 0, 0.9);
}

#log-modal-content,
.modal-content.large-modal {
    background: #000;
    border: 1px solid #333;
    border-radius: 0;
    /* Sharp corners */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    font-family: 'IBM Plex Mono', monospace;
}

.log-header,
.modal-header {
    background: #111;
    border-bottom: 1px solid #333;
    color: #fff;
    font-family: 'Inter', sans-serif;
    display: block;
    /* Reset flex */
    position: relative;
    /* Anchor for close button */
    padding: 15px;
    /* Add padding for spacing */
}

.log-body,
.modal-body {
    background: #000;
    color: #ccc;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
}

.log-pre {
    color: #0f0;
    /* Keep green for logs for contrast */
}

/* Log Entry Colors */
.log-success {
    color: #4f4;
}

.log-warn {
    color: #fe4;
}

.log-info {
    color: #aaf;
}

.log-norm {
    color: #888;
}

/* Scrollbar Minimal */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* --- Landing Page Styles (Orbital Minimalist) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=IBM+Plex+Mono:wght@400;600&display=swap');

.landing-body {
    background: #000000;
    /* Pitch black */
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    overflow-y: auto;
    margin: 0;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    border-bottom: 1px solid #222;
    /* Subtle divider */
}

.logo {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #fff;
    text-transform: uppercase;
}

.highlight {
    color: #fff;
}

.landing-header nav a {
    color: #666;
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.landing-header nav a:hover {
    color: #fff;
}

.landing-header nav .nav-cta {
    color: #fff;
    border: 1px solid #333;
    padding: 8px 16px;
    border-radius: 0;
    /* Sharp corners */
}

.landing-header nav .nav-cta:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    border-bottom: 1px solid #111;
}

/* Background Grid */
.background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50px 50px;
    background-image: linear-gradient(to right, #111 1px, transparent 1px),
        linear-gradient(to bottom, #111 1px, transparent 1px);
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #555;
    margin-bottom: 15px;
    display: block;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: 300;
    /* Light weight */
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #e0e0e0;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: #7a8b99;
    /* Muted steel blue */
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 520px;
}

.minimal-button {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    cursor: pointer;
}

.minimal-button:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Wireframe Visual */
.hero-visual {
    position: absolute;
    right: 15%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    z-index: 1;
}

.wireframe-globe {
    width: 100%;
    height: 100%;
    border: 1px solid #222;
    border-radius: 50%;
    position: relative;
    /* Static wireframe feel */
    background:
        linear-gradient(90deg, transparent 49%, #222 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, #222 50%, transparent 51%);
    background-size: 40px 40px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #444;
    border-radius: 50%;
}

.o1 {
    width: 450px;
    height: 150px;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0.6;
}

.o2 {
    width: 150px;
    height: 450px;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0.6;
}

/* Sections */
.info-section,
.tech-section {
    padding: 100px 10%;
    background: transparent;
    border-top: 1px solid #111;
}

.info-section h2,
.tech-section h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 60px;
    color: #fff;
    border-left: 2px solid #fff;
    padding-left: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    /* Divider gap */
    background: #222;
    /* Divider color */
    border: 1px solid #222;
}

.info-card {
    background: #000;
    padding: 40px;
    transition: background 0.2s;
}

.info-card:hover {
    background: #050505;
}

.info-card .icon-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #444;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
}

.info-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 15px 0;
    color: #fff;
}

.info-card p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

.tech-grid {
    display: flex;
    justify-content: flex-start;
    gap: 60px;
}

.tech-item h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #fff;
    margin-bottom: 10px;
    font-size: 1rem;
}

.tech-item p {
    font-family: 'IBM Plex Mono', monospace;
    color: #555;
    font-size: 0.8rem;
}

.landing-footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid #222;
    color: #444;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.landing-footer a {
    color: #666;
    text-decoration: none;
}

.landing-footer a:hover {
    color: #fff;
}

.status-ticker {
    display: flex;
    gap: 20px;
}

.status-item {
    color: #555;
}

.status-value {
    color: #fff;
    margin-left: 5px;
}

/* SATOQ Brand Typography */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');

.satoq-brand {
    font-family: 'Orbitron', 'Michroma', 'Arial Black', sans-serif;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, #aaa 50%, #fff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* --- SATOQ Preloader: Merging Circles --- */
#log-modal-overlay,
#sim-log-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    /* Ensure hidden by default */
    align-items: center;
    justify-content: center;
}

#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.loader-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.loader-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #fff;
    opacity: 0;
    transform: scale(3);
    /* Start large */
    animation: mergeToEarth 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.loader-label {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 2px;
    animation: blink 1.5s infinite;
}

.r1 {
    animation-delay: 0s;
    border-color: rgba(255, 255, 255, 0.8);
}

.r2 {
    animation-delay: 0.4s;
    border-color: rgba(255, 255, 255, 0.6);
}

.r3 {
    animation-delay: 0.8s;
    border-color: rgba(255, 255, 255, 0.4);
}

.r4 {
    animation-delay: 1.2s;
    border-color: rgba(255, 255, 255, 0.2);
}

@keyframes mergeToEarth {
    0% {
        transform: scale(3) rotate(0deg);
        opacity: 0;
    }

    30% {
        opacity: 0.8;
    }

    100% {
        transform: scale(1) rotate(180deg);
        opacity: 0;
        /* Fade out as it forms 'orbit' or sphere */
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

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

/* Sequence Text */
.loader-sequence {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: #e0e0e0;
    /* Minimalist White/Grey */
    height: 1.2em;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.loader-sequence.fade {
    opacity: 0;
}

/* Boot-up Animation Classes */
.boot-element {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.boot-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Modal Styles (Appended) --- */
#access-modal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content.large-modal {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.close-btn {
    position: absolute;
    color: #666;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.close-btn:hover {
    color: #fff;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.form-group label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 5px;
    display: block;
    text-transform: uppercase;
}

.form-group input {
    background: #050505;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'IBM Plex Mono', monospace;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4bd;
}

/* Dithered / Disabled Button Style */
.dithered {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 5px,
            rgba(255, 255, 255, 0.1) 5px,
            rgba(255, 255, 255, 0.1) 10px);
    pointer-events: none;
}

/* --- New Landing Page Sections (Refinement) --- */

.section-header {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 2px;
    border: none;
    padding: 0;
    margin-bottom: 30px;
}

.content-block {
    max-width: 800px;
}

.highlight-text {
    font-size: 1.25rem;
    color: #7a8b99;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 20px;
}

.highlight-text.large {
    font-size: 1.6rem;
    text-align: center;
}

.stat-highlight {
    margin: 40px 0;
    padding: 20px;
    border-left: 1px solid #444;
    background: linear-gradient(90deg, #111 0%, transparent 100%);
}

.stat-line {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: #7a8b99;
    margin-bottom: 10px;
}

.danger-text {
    font-family: 'IBM Plex Mono', monospace;
    color: #7a8b99;
    font-size: 1.1rem;
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
    display: inline-block;
}

.bg-contrast {
    background: #050505;
}

.center-align {
    text-align: center;
    margin: 0 auto;
}

.feature-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.feature-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #7a8b99;
    border: 1px solid #333;
    padding: 12px 20px;
    background: #000;
}

.closing-statement {
    font-size: 1.1rem;
    color: #7a8b99;
    margin-top: 40px;
    font-weight: 300;
}

.reality-footer {
    text-align: center;
    margin-top: 40px;
    font-family: 'IBM Plex Mono', monospace;
    color: #7a8b99;
    border-top: 1px solid #222;
    padding-top: 20px;
}

.reality-grid .info-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}