/* Reset & Core variables */
:root {
    --bg-dark: #070913;
    --panel-bg: rgba(13, 17, 33, 0.7);
    --panel-border: rgba(56, 189, 248, 0.15);
    --panel-border-glow: rgba(56, 189, 248, 0.4);
    --accent-blue: #0284c7;
    --accent-sky: #38bdf8;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Parchment Theme for Diary */
    --parch-bg: #f5eedc;
    --parch-text: #2c251e;
    --parch-border: #d4c5a9;
    --parch-ink: #3e3227;
    --parch-cursive: 'Cinzel', Georgia, serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Animations */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.25;
    z-index: -2;
    animation: backgroundShift 120s linear infinite;
}

.nebula-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 70% 60%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    z-index: -1;
    animation: nebulaRotate 180s linear infinite;
}

@keyframes backgroundShift {
    from { background-position: 0 0, 40px 60px, 130px 270px; }
    to { background-position: 550px 550px, 390px 410px, 380px 820px; }
}

@keyframes nebulaRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
.app-header {
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--accent-sky);
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

.logo-text h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-weight: 600;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-sky);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glow-dot {
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    from { opacity: 0.4; filter: drop-shadow(0 0 1px var(--accent-sky)); }
    to { opacity: 1; filter: drop-shadow(0 0 4px var(--accent-sky)); }
}

/* Main Container Layout */
.app-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    width: 100%;
}

/* Panels */
.telescope-panel, .notebook-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s;
}

.telescope-panel:focus-within {
    border-color: var(--panel-border-glow);
}

.panel-header {
    background: rgba(13, 17, 33, 0.9);
    border-bottom: 1px solid var(--panel-border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-sky);
}

.coordinate-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Eyepiece / Telescope Lens styling */
.eyepiece-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1;
    margin: 1.5rem auto;
    border-radius: 50%;
    border: 10px solid #1e293b;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.05),
        0 15px 35px rgba(0,0,0,0.8),
        inset 0 10px 30px rgba(0,0,0,0.9);
    overflow: hidden;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#telescope-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.lens-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 10;
}

.reticle-h, .reticle-v {
    position: absolute;
    background: rgba(56, 189, 248, 0.15);
    pointer-events: none;
    z-index: 5;
}

.reticle-h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
}

.reticle-v {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
}

.circle-degrees {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px dashed rgba(56, 189, 248, 0.08);
    pointer-events: none;
    z-index: 5;
}

.mode-indicator {
    position: absolute;
    bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
}

/* Controls Grid */
.controls-container {
    padding: 1.5rem;
    border-top: 1px solid var(--panel-border);
    background: rgba(13, 17, 33, 0.4);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-row {
    display: flex;
    gap: 1rem;
}

.flex-1 {
    flex: 1;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Targets Grid */
.target-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.target-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.target-btn i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.target-btn:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
}

.target-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-sky);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.target-btn.active i {
    color: var(--accent-sky);
}

/* Night and Era Selectors */
.night-selector, .era-selector {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.night-btn, .era-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.night-btn:hover, .era-btn:hover {
    color: var(--text-main);
}

.night-btn.active {
    background: var(--accent-blue);
    color: white;
}

.era-btn.active {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: var(--accent-gold);
}

#btn-era-modern.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-sky);
}

/* Sliders */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-value {
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-gold);
}

.slider-group.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.app-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #1e293b;
    outline: none;
    margin: 0.5rem 0;
}

.app-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-sky);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
    transition: transform 0.1s;
}

.app-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Tabs Header */
.tabs-header {
    background: rgba(13, 17, 33, 0.9);
    border-bottom: 1px solid var(--panel-border);
    display: flex;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--accent-sky);
    border-bottom-color: var(--accent-sky);
    background: rgba(56, 189, 248, 0.04);
}

/* Tab Contents */
.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* Parchment Journal Paper Styling */
.parchment {
    background-color: var(--parch-bg);
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    color: var(--parch-text);
    border: 1px solid var(--parch-border);
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 
        inset 0 0 40px rgba(92, 61, 36, 0.15),
        0 4px 15px rgba(0, 0, 0, 0.4);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.parchment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(92, 61, 36, 0.2);
    padding-bottom: 0.5rem;
}

.parchment-header h3 {
    font-family: var(--parch-cursive);
    font-size: 1.2rem;
    color: var(--parch-ink);
}

.parchment-header .date {
    font-family: var(--parch-cursive);
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(92, 61, 36, 0.7);
}

.cursive {
    font-family: var(--parch-cursive);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--parch-ink);
    margin-bottom: 1rem;
}

.parchment-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, rgba(92, 61, 36, 0.3), transparent);
    margin: 1.5rem 0;
}

.instructions-box {
    background: rgba(92, 61, 36, 0.05);
    border-left: 4px solid #a89470;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.instructions-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--parch-ink);
}

.instructions-box ol {
    margin-left: 1.2rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

.instructions-box li {
    margin-bottom: 0.4rem;
}

/* Analysis decision box */
.analysis-box {
    background: rgba(92, 61, 36, 0.08);
    border: 1px dashed rgba(92, 61, 36, 0.3);
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: auto;
}

.analysis-box h4 {
    font-family: var(--parch-cursive);
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--parch-ink);
    border-bottom: 1px solid rgba(92, 61, 36, 0.1);
    padding-bottom: 0.3rem;
}

.analysis-controls p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.btn-row {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.action-btn {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #7c6853;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.btn-comet {
    background: #e2d3b4;
    color: #4a3b2c;
}

.btn-comet:hover {
    background: #a82e2e;
    color: white;
    border-color: #8c2424;
}

.btn-nebula {
    background: #2c251e;
    color: #f5eedc;
}

.btn-nebula:hover {
    background: #4a5c3d;
    color: white;
    border-color: #3b4a30;
}

.classification-result {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.8rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.4);
    min-height: 60px;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--text-muted);
}

.classification-result.success {
    background: rgba(74, 92, 61, 0.1);
    border-left-color: #4a5c3d;
    color: #2c3c21;
}

.classification-result.fail {
    background: rgba(168, 46, 46, 0.08);
    border-left-color: #a82e2e;
    color: #631414;
}

/* Modern Science Styling */
.modern-science h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--accent-sky);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.intro-p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.science-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    transition: transform 0.2s;
}

.science-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.2);
}

.science-card.highlight {
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.25);
}

.card-icon {
    font-size: 1.8rem;
    color: var(--accent-sky);
    display: flex;
    align-items: flex-start;
}

.card-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.card-content p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-content ul {
    margin-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-content li {
    margin-bottom: 0.3rem;
}

.interactive-sandbox {
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.interactive-sandbox h4 {
    font-size: 0.95rem;
    color: var(--accent-gold);
    margin-bottom: 0.4rem;
}

.interactive-sandbox p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Catalog Comparative view */
.catalog-gallery h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.catalog-gallery > p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.catalog-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.catalog-item-header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-gold);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comparison-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.comparison-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.simulated-view {
    aspect-ratio: 1.6;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Simulated images using gradients for high-fidelity placeholders */
.m71-historical {
    background: radial-gradient(circle, rgba(120,120,120,0.6) 0%, rgba(80,80,80,0.2) 40%, #000 70%);
    filter: blur(8px) contrast(1.5);
}

.m71-modern {
    background: 
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 48% 52%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
        #000;
    /* Add multiple small white dots using box-shadow in JS or pseudo elements */
}
.m71-modern::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.8) 1px, transparent 4px),
        radial-gradient(white, rgba(255,255,255,.9) 1px, transparent 3px);
    background-size: 15px 15px, 25px 25px;
    background-position: 5px 5px, 12px 18px;
    opacity: 0.7;
}

.bh-historical {
    background: radial-gradient(circle, rgba(100,100,100,0.5) 0%, rgba(60,60,60,0.15) 30%, #000 65%);
    filter: blur(10px) contrast(1.2);
}

.bh-modern {
    background: 
        radial-gradient(circle at 50% 50%, #000 20%, transparent 21%),
        radial-gradient(ellipse at 50% 50%, rgba(249, 115, 22, 0.8) 0%, rgba(239, 68, 68, 0.4) 30%, transparent 60%),
        #000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.bh-modern::after {
    content: '';
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: #000;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.8);
    z-index: 2;
}

.catalog-item .description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-muted);
}

/* Footer */
.app-footer {
    background: rgba(7, 9, 19, 0.95);
    border-top: 1px solid var(--panel-border);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .target-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-row {
        flex-direction: column;
    }
    
    .eyepiece-container {
        border-width: 6px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   MLOPS PIPELINE & AIRFLOW SIMULATOR
   ========================================== */
.mlops-pipeline {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.mlops-pipeline h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--accent-sky);
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 0.5rem;
}

.airflow-control-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.airflow-status-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dag-info {
    font-size: 0.85rem;
}

.dag-label {
    color: var(--text-muted);
}

.dag-id {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-sky);
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

.status-badge.status-idle {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.status-running {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(251, 191, 36, 0.4);
    animation: statusPulse 1.5s infinite ease-in-out;
}

.status-badge.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.status-badge.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.btn-airflow-run {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-sky) 100%);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 6px;
}

.btn-airflow-run:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
}

.btn-airflow-run:active {
    transform: translateY(0);
}

/* DAG graph rendering */
.dag-visual-graph {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1.2rem 0.5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow-x: auto;
    gap: 0.3rem;
}

.dag-node {
    background: rgba(13, 17, 33, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 105px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dag-node:hover {
    border-color: var(--accent-sky);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
    transform: scale(1.03);
}

.dag-node.active-detail {
    border-color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.dag-node i {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.dag-node.node-success i {
    color: #10b981;
}

.dag-node.node-running i {
    color: var(--accent-gold);
}

.dag-node .node-name {
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.dag-node.node-success .node-name {
    color: var(--text-main);
}

.dag-node.node-running .node-name {
    color: var(--text-main);
}

.node-status-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
}

.dag-node.node-queued .node-status-dot {
    background: var(--text-muted);
}

.dag-node.node-running .node-status-dot {
    background: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold);
    animation: statusPulse 1s infinite;
}

.dag-node.node-success .node-status-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.dag-node.node-failed .node-status-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.dag-edge {
    color: rgba(56, 189, 248, 0.2);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

/* Step Details Card */
.step-detail-card {
    background: rgba(13, 17, 33, 0.75);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1.2rem;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.step-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    padding-bottom: 0.5rem;
}

.step-detail-header h4 {
    font-size: 1.05rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.paper-ref {
    font-size: 0.72rem;
    color: var(--accent-sky);
    font-family: 'JetBrains Mono', monospace;
}

.step-desc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.step-interactive-visual {
    background: rgba(7, 9, 19, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 6px;
    width: 100%;
    min-height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.placeholder-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Model Registry Table */
.model-registry-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.model-registry-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--text-main);
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
}

.registry-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
    background: rgba(13, 17, 33, 0.4);
}

.registry-table th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--accent-sky);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--panel-border);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.registry-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
}

.registry-table tr:hover {
    background: rgba(56, 189, 248, 0.05);
}

/* MLOps Visual Aids */
.mlops-visual-flex {
    display: flex;
    width: 100%;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.mlops-chart-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mlops-chart-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: bold;
    text-align: center;
}

.mlops-canvas-small {
    background: #000;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.mlops-metrics-box {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-main);
}

.mlops-metric-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.15);
    padding-bottom: 0.3rem;
}

.mlops-metric-item:last-child {
    border-bottom: none;
}

.mlops-metric-lbl {
    color: var(--text-muted);
}

.mlops-metric-val {
    font-weight: bold;
    color: var(--accent-sky);
}

.mlops-metric-val.val-green {
    color: #10b981;
}

.mlops-metric-val.val-gold {
    color: var(--accent-gold);
}

.mlops-metric-val.val-red {
    color: var(--accent-red);
}

@media (max-width: 600px) {
    .dag-visual-graph {
        justify-content: flex-start;
    }
    .mlops-visual-flex {
        flex-direction: column;
        gap: 1rem;
    }
}
