/* ═══════════════════════════════════════════════════════════════
   CYBER-PHYSICS TERMINAL STYLE
   Shared stylesheet for all astronomy articles
   ═══════════════════════════════════════════════════════════════ */

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #050505;
    color: #e2e8f0;
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══ CRT SCANLINES ═══ */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.15) 2px,
            rgba(0, 0, 0, 0.15) 4px
        );
    pointer-events: none;
    z-index: 9999;
}

/* ═══ MAIN CONTAINER ═══ */
.terminal-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 32px 80px;
    position: relative;
}

/* ═══ CORNER RETICLES ═══ */
.terminal-container::before,
.terminal-container::after {
    content: '';
    position: fixed;
    width: 24px; height: 24px;
    border-color: #34d399;
    border-style: solid;
    opacity: 0.4;
    z-index: 100;
}
.terminal-container::before {
    top: 12px; left: 12px;
    border-width: 2px 0 0 2px;
}
.terminal-container::after {
    top: 12px; right: 12px;
    border-width: 2px 2px 0 0;
}

/* ═══ HEADINGS ═══ */
h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #34d399;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.5), 0 0 30px rgba(52, 211, 153, 0.2);
    margin: 48px 0 8px;
    padding-bottom: 4px;
}
h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #22d3ee;
    letter-spacing: 0.12em;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
    margin: 40px 0 8px;
}
h3 {
    font-size: 1.1rem;
    font-weight: 400;
    color: #34d399;
    letter-spacing: 0.1em;
    margin: 28px 0 8px;
}
h4, h5, h6 {
    font-size: 0.95rem;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 20px 0 6px;
}

.hud-title-line {
    height: 1px;
    background: linear-gradient(90deg, #34d399, transparent);
    margin-bottom: 20px;
    opacity: 0.6;
}
h2 + .hud-title-line {
    background: linear-gradient(90deg, #22d3ee, transparent);
}

/* ═══ GLITCH HOVER ═══ */
.glitch-hover {
    position: relative;
}
.glitch-hover:hover {
    animation: textGlitch 0.3s ease-in-out;
}
@keyframes textGlitch {
    0%   { text-shadow: 0 0 12px rgba(52,211,153,0.5); }
    25%  { text-shadow: -2px 0 #ef4444, 2px 0 #22d3ee; }
    50%  { text-shadow: 2px 0 #ef4444, -2px 0 #22d3ee; }
    75%  { text-shadow: -1px 0 #ef4444, 1px 0 #22d3ee; }
    100% { text-shadow: 0 0 12px rgba(52,211,153,0.5); }
}

/* ═══ PARAGRAPH ═══ */
p {
    margin: 12px 0;
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 300;
}

/* ═══ LINKS & WIKI LINKS ═══ */
a, .wiki-link {
    color: #34d399;
    text-decoration: none;
    border-bottom: 1px solid rgba(52, 211, 153, 0.3);
    transition: all 0.2s;
    cursor: pointer;
}
a:hover, .wiki-link:hover {
    color: #6ee7b7;
    text-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
    border-bottom-color: #34d399;
}

/* ═══ STRONG / EM ═══ */
strong { color: #f1f5f9; font-weight: 700; }
em { color: #22d3ee; font-style: italic; }

/* ═══ INLINE CODE ═══ */
.inline-code {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

/* ═══ CODE BLOCKS ═══ */
pre {
    background: #0a0a0a;
    border: 1px solid #1e293b;
    border-radius: 4px;
    padding: 16px 20px;
    margin: 16px 0;
    overflow-x: auto;
    position: relative;
    font-size: 0.82rem;
    line-height: 1.7;
}
pre::before {
    content: '>';
    position: absolute;
    top: 8px; left: 8px;
    color: #34d399;
    opacity: 0.4;
    font-size: 0.7rem;
}
pre code {
    color: #a5f3fc;
    font-family: 'JetBrains Mono', monospace;
    background: none;
    border: none;
    padding: 0;
}

/* ═══ TABLES ═══ */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
th {
    background: rgba(52, 211, 153, 0.08);
    color: #34d399;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 400;
    font-size: 0.75rem;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(52, 211, 153, 0.3);
    text-align: left;
}
td {
    padding: 8px 14px;
    border-bottom: 1px solid #1e293b;
    color: #cbd5e1;
    font-weight: 300;
}
tr:hover td {
    background: rgba(52, 211, 153, 0.04);
}

/* ═══ LISTS ═══ */
ul {
    list-style: none;
    padding-left: 0;
    margin: 12px 0;
}
ul li {
    position: relative;
    padding-left: 20px;
    margin: 6px 0;
    font-size: 0.88rem;
    font-weight: 300;
    color: #cbd5e1;
}
ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #34d399;
    font-size: 0.8rem;
}

/* ═══ BLOCKQUOTE ═══ */
blockquote {
    border-left: 2px solid #22d3ee;
    padding: 12px 20px;
    margin: 16px 0;
    background: rgba(34, 211, 238, 0.04);
    font-style: italic;
    color: #94a3b8;
}
blockquote p { margin: 4px 0; color: #94a3b8; }

/* ═══ CALLOUTS ═══ */
.callout {
    border: 1px solid #1e293b;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}
.callout::before, .callout::after {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    border-color: #34d399;
    border-style: solid;
    opacity: 0.3;
}
.callout::before { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.callout::after  { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }

.callout-title {
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-bottom: 1px solid #1e293b;
}
.callout-content {
    padding: 14px 16px;
    font-size: 0.85rem;
    font-weight: 300;
}
.callout-content p { margin: 6px 0; }

.callout-abstract { border-color: rgba(34, 211, 238, 0.3); }
.callout-abstract .callout-title { color: #22d3ee; background: rgba(34, 211, 238, 0.06); }
.callout-tip { border-color: rgba(52, 211, 153, 0.3); }
.callout-tip .callout-title { color: #34d399; background: rgba(52, 211, 153, 0.06); }
.callout-quote { border-color: rgba(148, 163, 184, 0.3); }
.callout-quote .callout-title { color: #94a3b8; background: rgba(148, 163, 184, 0.06); }
.callout-question { border-color: rgba(250, 204, 21, 0.3); }
.callout-question .callout-title { color: #facc15; background: rgba(250, 204, 21, 0.06); }
.callout-warning { border-color: rgba(239, 68, 68, 0.3); }
.callout-warning .callout-title { color: #ef4444; background: rgba(239, 68, 68, 0.06); }

/* ═══ MATH (KaTeX overrides) ═══ */
.katex { color: #34d399; }
.katex .mord, .katex .mbin, .katex .mrel,
.katex .mopen, .katex .mclose, .katex .mpunct,
.katex .mop { color: #34d399; }
.katex-display {
    margin: 16px 0;
    text-shadow: 0 0 6px rgba(52, 211, 153, 0.3);
}
.katex-display > .katex { color: #34d399; }

/* ═══ HR ═══ */
.terminal-hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #34d399, transparent);
    margin: 32px 0;
    opacity: 0.4;
}

/* ═══ IMAGE PLACEHOLDER ═══ */
.image-placeholder {
    display: block;
    border: 1px dashed #34d399;
    padding: 20px;
    text-align: center;
    color: #34d399;
    opacity: 0.5;
    font-size: 0.8rem;
    margin: 16px 0;
    letter-spacing: 0.1em;
}

/* ═══ BREADCRUMB NAV ═══ */
.breadcrumb {
    font-size: 0.7rem;
    color: #475569;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e293b;
}
.breadcrumb span { color: #34d399; opacity: 0.5; }

/* ═══ SYSTEM STATUS BAR ═══ */
.status-bar {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: #0a0a0a;
    border-top: 1px solid #1e293b;
    padding: 6px 20px;
    font-size: 0.65rem;
    color: #475569;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    z-index: 1000;
}
.status-bar .status-online {
    color: #34d399;
}

/* ═══ BOTTOM CORNER RETICLES ═══ */
.corner-bl, .corner-br {
    position: fixed;
    width: 24px; height: 24px;
    border-color: #34d399;
    border-style: solid;
    opacity: 0.4;
    z-index: 100;
}
.corner-bl { bottom: 32px; left: 12px; border-width: 0 0 2px 2px; }
.corner-br { bottom: 32px; right: 12px; border-width: 0 2px 2px 0; }

/* ═══ PULSE ANIMATION ═══ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.pulse { animation: pulse 2s ease-in-out infinite; }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #34d399; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
    .terminal-container { padding: 24px 16px 80px; }
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.1rem; }
    .table-wrapper { overflow-x: auto; }
    table { font-size: 0.75rem; }
}
