/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #6b46c1;
    --secondary-purple: #8b5cf6;
    --light-purple: #a78bfa;
    --dark-purple: #4c1d95;
    --darker-purple: #2d1b69;
    --darkest-purple: #1e1b4b;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #e2e8f0;
    --dark-gray: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(rgba(30, 27, 75, 0.85), rgba(45, 27, 105, 0.85)), url('matt-gross-uPa8mFbySYw-unsplash.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 24px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(107, 70, 193, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    text-align: left;
    margin-bottom: 48px;
    padding-top: 2.5%;
    padding-bottom: 2.5%;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

/* HEADER STYLING */
.header h1 {
  font-family: 'Orbitron', sans-serif; /* futuristic font */
  font-size: 2.2rem;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-align: center;
  text-shadow: 
    0 0 8px rgba(0, 200, 255, 0.6),
    0 0 20px rgba(0, 150, 255, 0.5);
  background: linear-gradient(90deg, #00bcd4, #3f51b5, #9c27b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glowShift 6s ease-in-out infinite alternate;
}

/* subtle animated glow shift */
@keyframes glowShift {
  0% {
    text-shadow: 
      0 0 10px rgba(0, 200, 255, 0.6),
      0 0 25px rgba(0, 150, 255, 0.5);
  }
  100% {
    text-shadow: 
      0 0 15px rgba(255, 64, 129, 0.7),
      0 0 30px rgba(255, 0, 255, 0.4);
  }
}

/* optional: add a futuristic font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');


.header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 800px;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* =====================================================
   GRID LAYOUT - EQUAL HEIGHT COLUMNS FIX
   ===================================================== */

/* Mobile first - single column */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Tablet - 2 columns */
@media (min-width: 768px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* Desktop - 3 columns with equal heights */
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        align-items: stretch; /* Make all items same height */
    }
    
    /* Visualization spans full width */
    .visualization-panel {
        grid-column: 1 / -1;
        height: 550px;
        min-height: 420px;
        max-height: 720px;
    }

    /* Make all three bottom panels equal height */
    .grid > .panel {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* Panel title stays at top */
    .grid > .panel > h2 {
        flex-shrink: 0;
        margin-bottom: 20px;
    }
    
    /* Scrollable content grows to fill space */
    .grid > .panel .asteroid-list,
    .grid > .panel .controls,
    .grid > .panel .results,
    .grid > .panel .results-placeholder {
        flex: 1 1 auto;
        overflow-y: auto;
        min-height: 0;
        padding-right: 12px;
    }
    
    /* Buttons stay at bottom */
    .grid > .panel > .btn,
    .grid > .panel .controls > .btn {
        flex-shrink: 0;
        margin-top: auto;
    }
    
    /* Loading indicator */
    .grid > .panel #loading {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

/* =====================================================
   PANEL BASE STYLES
   ===================================================== */
.panel {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-purple);
    opacity: 0.8;
}

.panel h2 {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* =====================================================
   SCROLLBAR STYLING
   ===================================================== */
.asteroid-list::-webkit-scrollbar,
.controls::-webkit-scrollbar,
.results::-webkit-scrollbar {
    width: 10px;
}

.asteroid-list::-webkit-scrollbar-track,
.controls::-webkit-scrollbar-track,
.results::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.asteroid-list::-webkit-scrollbar-thumb,
.controls::-webkit-scrollbar-thumb,
.results::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00bcd4, #9c27b0);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.asteroid-list::-webkit-scrollbar-thumb:hover,
.controls::-webkit-scrollbar-thumb:hover,
.results::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #ff4081);
    box-shadow: 0 0 8px #00e5ff, 0 0 12px #ff4081;
}

/* Firefox */
.asteroid-list,
.controls,
.results {
    scrollbar-width: thin;
    scrollbar-color: #00bcd4 rgba(0, 0, 0, 0.3);
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 767px) {
    .panel {
        padding: 20px;
    }
    
    .panel h2 {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }
}
/* ===== DETECTION STRATEGIES LAYOUT ===== */
.detection-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.detection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1200px) {
    .detection-grid {
        grid-template-columns: 3fr 1fr;
        gap: 40px;
    }
}

.detection-strategies-panel {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.detection-strategies-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-purple);
    opacity: 0.8;
}

.how-to-use-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    height: fit-content;
}

.how-to-use-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-purple);
    opacity: 0.6;
}

.how-to-use-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.how-to-use-panel strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== PANELS ===== */
/* IMPACT PREDICTIONS PANEL SCROLL */
.results {
  max-height: 400px; /* or whatever fits your design */
  overflow-y: auto;
  padding-right: 10px; /* space for scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #00bcd4 #0a0a0a;
}

/* Optional - make scrollbar look nice */
.results::-webkit-scrollbar {
  width: 8px;
}
.results::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}
.results::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00bcd4, #9c27b0);
  border-radius: 10px;
}
.results::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00e5ff, #ff4081);
}


/* ===== LOADING STATE ===== */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading p {
    color: #94a3b8;
}

/* ===== 3D VISUALIZATION ===== */
.visualization-panel {
    grid-column: 1 / -1;
}

.earth-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: radial-gradient(ellipse at center, #0a0e27 0%, #000000 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 
        var(--shadow-lg),
        inset 0 0 100px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
}

.earth-container:hover {
    box-shadow: 
        var(--shadow-xl),
        inset 0 0 120px rgba(0, 0, 0, 0.7);
}

@media (min-width: 768px) {
    .earth-container {
        height: 500px;
    }
}

@media (min-width: 1200px) {
    .earth-container {
        height: 550px;
    }
}

#earth-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#earth-canvas:active {
    cursor: grabbing;
}

/* Loading indicator for canvas */
.earth-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(96, 165, 250, 0.2);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    pointer-events: none;
}

.earth-container.loaded::before {
    display: none;
}

/* ===== CONTROLS OVERLAY ===== */
.controls-overlay {
    position: absolute;
    padding: 20px;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .controls-overlay {
        max-width: 350px;
        left: auto;
        right: 20px;
    }
}

.control-item {
    margin-bottom: 12px;
}

.control-item:last-of-type {
    margin-bottom: 0;
}

.control-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #cbd5e1;
    font-weight: 500;
}

/* ===== LOCATION INFO ===== */
.location-info {
    padding: 16px;
    background: rgba(30, 41, 59, 0.9);
    border-left: 3px solid #60a5fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.location-info strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #60a5fa;
}

#location-details {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.6;
}

/* ===== ASTEROID LIST ===== */
.asteroid-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

.asteroid-item {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.asteroid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-purple);
    transform: scaleY(0);
    transition: var(--transition);
}

.asteroid-item:hover {
    background: var(--glass-bg-strong);
    transform: translateX(4px);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-md);
}

.asteroid-item:hover::before {
    transform: scaleY(1);
}

.asteroid-item.selected {
    background: rgba(107, 70, 193, 0.1);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-md);
}

.asteroid-item.selected::before {
    transform: scaleY(1);
    background: var(--primary-purple);
}

.asteroid-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.asteroid-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.4;
}

.hazardous {
    color: #ef4444;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Scrollbar Styling */
.asteroid-list::-webkit-scrollbar {
    width: 8px;
}

.asteroid-list::-webkit-scrollbar-track {
    background: #1e293b;
}

.asteroid-list::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.asteroid-list::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group input[type="range"],
.control-item input[type="range"] {
    width: 100%;
    height: 6px;
    background: #475569;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 4px;
}

.control-group input[type="range"]::-webkit-slider-thumb,
.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-purple);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
    transition: all 0.2s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover,
.control-item input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--secondary-purple);
    transform: scale(1.2);
}

.control-group input[type="range"]::-moz-range-thumb,
.control-item input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-purple);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
}

.control-group select {
    background: #334155;
    color: #fff;
    border: 1px solid #475569;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

.control-group small {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ===== BUTTONS ===== */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    animation: shimmer 2s infinite;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-purple);
    color: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--secondary-purple);
}

.btn-danger {
    background: var(--dark-purple);
    color: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--dark-purple);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-purple);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 8px;
}

/* ===== RESULTS ===== */
.results-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.results-placeholder .icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.6;
    filter: grayscale(0.3);
}

.results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results.hidden {
    display: none;
}

.result-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-purple);
    opacity: 0.8;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.result-card:hover::before {
    opacity: 1;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary-purple);
    line-height: 1.2;
}

.result-unit {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Color coding for results */
.result-card.energy .result-value {
    color: #fbbf24;
}

.result-card.crater .result-value {
    color: #fb923c;
}

.result-card.seismic .result-value {
    color: #a78bfa;
}

.result-card.blast .result-value {
    color: #ef4444;
}

.result-card.tsunami .result-value {
    color: #10b981;
}

.result-card.tsunami .result-value.high {
    color: #ef4444;
}

.result-card.tsunami .result-value.moderate {
    color: #fbbf24;
}

/* ===== SCIENTIFIC NOTE ===== */
.scientific-note {
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    padding: 14px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.scientific-note strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* ===== MITIGATION STRATEGIES (IMPROVED) ===== */
.mitigation-section {
    margin-top: 40px;
    margin-bottom: 32px;
}

.mitigation-panel {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

/* keep full-width mitigation panel */
.mitigation-panel.full-width {
    width: 100%;
    max-width: none;
}

/* default mitigation-grid layout (mobile-first) */
.mitigation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* on larger screens make mitigation into three columns with left column larger */
@media (min-width: 1024px) {
    .mitigation-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 36px;
    }

    .strategy-selector { grid-column: 1 / 2; }
    .warning-time-section { grid-column: 2 / 3; }
    .deflection-results { grid-column: 3 / 4; }
}

/* on very wide screens give a little more room */
@media (min-width: 1400px) {
    .mitigation-grid {
        grid-template-columns: 2.2fr 1fr 1fr;
        gap: 40px;
    }
}

/* ===== ABOUT SECTION ===== */
/* place about as its own row below mitigation and center it */
.about-section {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
}

.about-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 640px; /* keeps about narrow and centered */
}

.about-panel h2 {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.about-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.about-panel strong {
    color: var(--text-primary);
    font-weight: 600;
}

.mitigation-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-purple);
    opacity: 0.8;
}

/* Detection Strategies Section Headings */
.detection-strategies-panel h2 {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.how-to-use-panel h2 {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Section Headings */
.strategy-selector h3,
.warning-time-section h3,
.deflection-results h3 {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-purple);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Detection Strategies Grid Layout */
.detection-strategies-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .detection-strategies-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 28px;
    }
}

/* Strategy Cards - More Spacious */
.strategy-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .strategy-cards {
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .strategy-cards {
        gap: 28px;
    }
}

.strategy-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-purple);
    transform: scaleX(0);
    transition: var(--transition);
}

.strategy-card:hover {
    background: var(--glass-bg-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-purple);
}

.strategy-card:hover::before {
    transform: scaleX(1);
}

.strategy-card.selected {
    border-color: var(--primary-purple);
    background: rgba(107, 70, 193, 0.1);
    box-shadow: var(--shadow-md);
}

.strategy-card.selected::before {
    transform: scaleX(1);
    background: var(--primary-purple);
}

.strategy-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.strategy-name {
    font-family: 'SF Display Pro', 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.strategy-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

/* ===== TIMELINE VISUAL (IMPROVED) ===== */
.timeline-visual {
    margin-top: 20px;
}

.timeline-bar {
    position: relative;
    height: 40px;
    background: #334155;
    border-radius: 20px;
    margin-bottom: 14px;
    overflow: hidden;
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    border-radius: 20px;
    transition: width 0.3s;
    width: 25%;
}

.timeline-marker {
    position: absolute;
    left: 25%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fbbf24;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: left 0.3s;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.5);
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ===== DEFLECTION RESULTS (IMPROVED) ===== */
.deflection-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 0.9rem;
}

.deflection-output {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
}

.deflection-output.hidden {
    display: none;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.result-row:last-of-type {
    border-bottom: none;
}

.result-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding-left: 12px;
    padding-right: 12px;
    margin: 0 -12px;
}

.result-row .label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.result-row .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.result-row .value.high-prob {
    color: #10b981;
}

.result-row .value.medium-prob {
    color: #fbbf24;
}

.result-row .value.low-prob {
    color: #ef4444;
}

/* Feasibility Indicator */
.feasibility-indicator {
    margin-top: 20px;
}

/* === FEASIBILITY BAR === */
.feasibility-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background: #1a1a1a; /* dark neutral background */
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.6);
}

#feasibility-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: width 1s ease, background-color 0.6s ease;
}

/* color-coded fill depending on feasibility level */
.feasibility-fill.high {
  background: linear-gradient(90deg, #1fe67b, #00b341); /* green */
}

.feasibility-fill.medium {
  background: linear-gradient(90deg, #f7d84e, #f0b90b); /* yellow */
}

.feasibility-fill.low {
  background: linear-gradient(90deg, #ff6b6b, #d82b2b); /* red */
}

/* Feasibility label */
.feasibility-label {
  position: absolute;
  top: -25px;
  right: 0;
  font-weight: 600;
  color: white;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
}


.feasibility-label.high {
    color: #10b981;
}

.feasibility-label.medium {
    color: #fbbf24;
}

.feasibility-label.low {
    color: #ef4444;
}

/* Mission Notes */
.mission-notes {
    margin-top: 16px;
    padding: 14px;
    background: #1e293b;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    margin-top: 32px;
    padding: 24px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.footer strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767px) {
    body {
        padding: 12px;
    }
    
    .header {
        margin-bottom: 32px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .panel {
        padding: 20px;
    }
    
    .results {
        gap: 16px;
    }
    
    .result-card {
        padding: 16px;
    }
    
    .result-value {
        font-size: 1.6rem;
    }
    
    .earth-container {
        height: 350px;
    }
    
    .controls-overlay {
        padding: 16px;
        bottom: 16px;
        left: 16px;
        right: 16px;
    }
    
    .strategy-card {
        padding: 16px;
        min-height: 130px;
    }
    
    .strategy-icon {
        font-size: 1.8rem;
    }
    
    .mitigation-panel {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .panel h2 {
        font-size: 1.3rem;
    }
    
    .detection-strategies-panel {
        padding: 24px;
    }
    
    .how-to-use-panel {
        padding: 20px;
    }
    
    .strategy-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .strategy-card {
        min-height: 110px;
        padding: 14px;
    }
}

@media (max-width: 1023px) {
    .detection-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .detection-strategies-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* On medium screens, keep the mitigation as stacked columns */
    .mitigation-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (min-width: 1400px) {
    .header h1 {
        font-size: 3.5rem;
    }
    
    .header p {
        font-size: 1.3rem;
    }
    
    .panel h2 {
        font-size: 1.5rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .strategy-card {
        padding: 22px;
        min-height: 150px;
    }
}

/* small helper to allow overflowing children (tooltips etc) in mitigation */
.mitigation-panel .strategy-card,
.mitigation-panel .strategy-cards,
.mitigation-panel .strategy-selector {
    overflow: visible;
}

/* === FIX BUTTON FONT === */
.btn {
    font-family: 'Poppins', sans-serif !important;
}

/* === FIX GAP AFTER CALCULATE IMPACT === */
@media (min-width: 1200px) {
    .grid {
        align-items: start !important; /* prevents the row from being stretched */
    }

    .visualization-panel {
        align-self: start; /* ensures the visualization stays compact */
    }

    .panel {
        height: auto; /* prevents unintended expansion */
    }
}

/* === Fix big gap below visualization + keep Poppins on buttons === */
.btn {
  font-family: 'Poppins', sans-serif !important;
}

/* Ensure grid rows size to content (avoid letting the second row stretch) */
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    /* Make rows auto-sized so the second row won't expand to fill space */
    grid-auto-rows: auto !important;
    align-items: start; /* ensure children stick to top of their grid row */
  }

  /* Keep visualization height predictable but flexible */
  .visualization-panel {
    grid-column: 1 / -1;
    height: auto;        /* let content determine height */
    min-height: 420px;   /* baseline */
    max-height: 720px;   /* prevents runaway expansion */
    align-self: start;   /* don't stretch vertically */
  }

  /* Make sure panels in the second row don't stretch the row */
  .grid > .panel {
    height: auto;
    min-height: 0;
  }

  /* ensure internal scrollable areas behave without forcing parent height */
  .asteroid-list,
  .results,
  .results-placeholder {
    max-height: 360px;
    overflow: auto;
    min-height: 0;
  }
}

/* ===== Force results visible & readable (temporary debug helper) ===== */
.results {
  display: flex !important;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  max-height: none;
  overflow: visible;
  z-index: 5; /* bring forward if covered */
}

/* keep the ability to hide via .hidden, but ensure devs can override in debugging */
.results.hidden {
  display: none !important;
}

/* make sure result cards and numeric values are visible on dark background */
.result-card {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.06) !important;
  color: var(--text-primary) !important;
  overflow: visible !important;
}

.result-card .result-value {
  /* high-contrast color so numbers are obvious */
  color: #ffd54d !important;
  font-size: 2rem !important;
  line-height: 1.1 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
  z-index: 6 !important;
}

/* make sure small subtext is readable */
.result-subtext, .result-unit {
  color: var(--text-secondary) !important;
}

/* ensure that when the results area becomes visible it doesn't push layout unexpectedly */
.grid > .panel { min-height: 0; }

/* ===== Slidable results panel — slide up from bottom-right ===== */

/* base position (offscreen) */
.slidable-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 380px;                /* reasonable default — adjust as needed */
  max-width: calc(100% - 48px);
  max-height: 72vh;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transform: translateY(110%); /* hidden below viewport */
  transition: transform 0.36s cubic-bezier(.2,.9,.2,1), opacity 0.28s;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.5));
  font-family: inherit; /* inherit so your results styling remains identical */
}

/* visible/open state */
.slidable-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* small toggle button anchored to the panel */
.results-toggle {
  position: absolute;
  left: 50%;
  top: -34px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif; /* explicit Poppins for button text */
}

/* hover/focus */
.results-toggle:hover,
.results-toggle:focus {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: var(--shadow-lg);
  outline: none;
}

/* style the panel interior so your existing .results CSS still applies */
.slidable-content {
  background: transparent;
  width: 100%;
  overflow: auto;
  padding: 12px 12px 18px 12px;
  box-sizing: border-box;
}

/* when screen is small, use full-width bottom drawer */
@media (max-width: 768px) {
  .slidable-panel {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
    transform: translateY(110%);
  }

  .results-toggle {
    top: -40px;
    left: 16px;
    transform: none;
  }
}

/* Ensure inner .results styles keep behaving inside the floating panel */
.slidable-panel .results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* slightly reduce padding of inner cards to fit the panel nicely */
.slidable-panel .result-card {
  margin: 0;
}

/* accessibility: visible focus ring */
.results-toggle:focus {
  box-shadow: 0 0 0 3px rgba(107,70,193,0.18), var(--shadow-md);
}

/* If you want a close affordance inside the panel, here's a small X in top-right */
.slidable-panel .close-small {
  position: absolute;
  right: 10px;
  top: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 6px;
  border-radius: 6px;
}
.slidable-panel .close-small:hover { color: var(--text-primary); }

/* ======================= FOOTER STYLES ======================= */

.footer {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 60px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h2 {
  font-size: 1.4rem;
  color: var(--accent-primary, #d17fff);
  margin-bottom: 10px;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.footer-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-section .subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 10px;
}

.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.team-list li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.05);
  transition: background 0.3s, transform 0.3s;
}

.team-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

.team-list .name {
  font-weight: 600;
  color: var(--text-primary);
}

.team-list .handle {
  color: var(--accent-primary, #d17bff);
  font-family: monospace;
}

.team-list .location {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary, rgba(255, 255, 255, 0.6));
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
  .footer {
    padding: 30px 24px;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
  .footer-section h2 {
    font-size: 1.2rem;
  }
}

/* =========================
   HEADER CENTERING & STYLE
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

.header {
  text-align: center;           /* center header content */
  padding-top: 2.5%;
  padding-bottom: 2.5%;
}

/* nicer, responsive title — override earlier rules */
.header h1 {
  font-family: 'Orbitron', 'Poppins', sans-serif !important;
  display: inline-block;
  margin: 0 auto;
  font-size: clamp(1.8rem, 3.6vw, 3.8rem) !important;
  letter-spacing: 0.6px;
  line-height: 1.05;
  background: linear-gradient(90deg, #00bcd4, #8b5cf6, #9f7aea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 6px 28px rgba(107,70,193,0.12),
    0 2px 6px rgba(0,0,0,0.45);
  transition: var(--transition);
}

/* keep subtitle centered and constrained width */
.header p {
  text-align: center;
  margin: 8px auto 0;
  max-width: 920px;
  color: var(--text-secondary);
}

/* =========================
   GRID / PANEL ALIGNMENT
   ========================= */
@media (min-width: 1200px) {
  /* force grid children to stick to top */
  .grid {
    align-items: start !important;
  }

  /* ensure each panel doesn't force row height and can shrink */
  .grid > .panel {
    align-self: start;
    min-height: 0;
  }

  /* ensure visualization doesn't stretch the second row */
  .visualization-panel {
    align-self: start;
    margin-bottom: 20px;
  }
}

/* =========================
   PREDICTIONS — SCROLLABLE
   ========================= */
/* If you added the .predictions-panel class in HTML (recommended) */
.predictions-panel {
  display: flex;
  flex-direction: column;
  min-height: 0; /* important for children with overflow */
  align-self: start;
}

/* make the results area scroll in the predictions panel without growing its parent */
.predictions-panel .results,
.predictions-panel .results-placeholder {
  flex: 1 1 auto;
  max-height: calc(60vh); /* adjust to taste (e.g. 50vh - 70vh) */
  overflow-y: auto;
  padding-right: 12px;   /* room for scrollbar */
  min-height: 0;
}

/* =========================
   HEADER CENTERING & STYLE
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

.header {
  text-align: center;           /* center header content */
  padding-top: 2.5%;
  padding-bottom: 2.5%;
}

/* nicer, responsive title — override earlier rules */
.header h1 {
  font-family: 'Orbitron', 'Poppins', sans-serif !important;
  display: inline-block;
  margin: 0 auto;
  font-size: clamp(1.8rem, 3.6vw, 3.8rem) !important;
  letter-spacing: 0.6px;
  line-height: 1.05;
  background: linear-gradient(90deg, #00bcd4, #8b5cf6, #9f7aea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 6px 28px rgba(107,70,193,0.12),
    0 2px 6px rgba(0,0,0,0.45);
  transition: var(--transition);
}

/* keep subtitle centered and constrained width */
.header p {
  text-align: center;
  margin: 8px auto 0;
  max-width: 920px;
  color: var(--text-secondary);
}

/* =========================
   GRID / PANEL ALIGNMENT
   ========================= */
@media (min-width: 1200px) {
  /* force grid children to stick to top */
  .grid {
    align-items: start !important;
  }

  /* ensure each panel doesn't force row height and can shrink */
  .grid > .panel {
    align-self: start;
    min-height: 0;
  }

  /* ensure visualization doesn't stretch the second row */
  .visualization-panel {
    align-self: start;
    margin-bottom: 20px;
  }
}

/* =========================
   PREDICTIONS — SCROLLABLE
   ========================= */
/* If you added the .predictions-panel class in HTML (recommended) */
.predictions-panel {
  display: flex;
  flex-direction: column;
  min-height: 0; /* important for children with overflow */
  align-self: start;
}

/* make the results area scroll in the predictions panel without growing its parent */
.predictions-panel .results,
.predictions-panel .results-placeholder {
  flex: 1 1 auto;
  max-height: calc(60vh); /* adjust to taste (e.g. 50vh - 70vh) */
  overflow-y: auto;
  padding-right: 12px;   /* room for scrollbar */
  min-height: 0;
}

/* scrollbar styling (nice and subtle) */
.predictions-panel .results::-webkit-scrollbar,
.predictions-panel .results-placeholder::-webkit-scrollbar {
  width: 10px;
}
.predictions-panel .results::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
}
.predictions-panel .results::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #6b46c1);
  border-radius: 10px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.35);
}
.predictions-panel .results::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.08);
}

/* ensure inner result-cards keep their padding when scrolled */
.predictions-panel .result-card {
  margin: 8px 0;
}

/* If you DON'T want to change HTML, use nth-child fallback selector
   (this targets the 4th child in the .grid — the rightmost results panel in your layout) */
@media (min-width: 1200px) {
  .grid > .panel:nth-child(4) .results,
  .grid > .panel:nth-child(4) .results-placeholder {
    flex: 1 1 auto;
    max-height: calc(60vh);
    overflow-y: auto;
    padding-right: 12px;
    min-height: 0;
  }

  .grid > .panel:nth-child(4) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    align-self: start;
  }
}
/* =====================================================
   1️⃣  GRID ALIGNMENT — make all columns uniform
   ===================================================== */
@media (min-width: 1200px) {
  .grid {
    align-items: start !important;
  }

  /* Make all panels the same height visually */
  .grid > .panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* Restrict scrollable content inside */
  .grid > .panel:first-child,
  .grid > .panel:last-child {
    max-height: 65vh; /* same height for both side panels */
    overflow-y: hidden; /* hide outer scroll */
  }

  /* ensure internal content scrolls smoothly */
  .grid > .panel:first-child > div,
  .grid > .panel:last-child > div {
    flex: 1 1 auto;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-gutter: stable both-edges;
  }
}

/* =====================================================
   2️⃣  UNIVERSAL SCROLLBAR STYLING (Purple glow)
   ===================================================== */
*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #6b46c1);
  border-radius: 10px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4);
}

*::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.1);
}

/* for Firefox */
* {
  scrollbar-color: #6b46c1 rgba(255, 255, 255, 0.07);
  scrollbar-width: thin;
}
/* ============================= */
/* 🌠 IMPACT CARD SCROLLABLE FIX */
/* ============================= */
.impact-predictions {
  max-height: 350px; /* adjust height as needed */
  overflow-y: auto;
  padding-right: 8px; /* keeps scrollbar from overlapping content */
  scrollbar-gutter: stable; /* keeps layout consistent */
}

/* ============================= */
/* 🌈 UNIVERSAL SCROLLBAR STYLING */
/* ============================= */

/* Chrome, Edge, Safari (WebKit browsers) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a; /* dark background to match theme */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00bcd4, #9c27b0);
  border-radius: 10px;
  border: 2px solid #0a0a0a; /* gives separation so it doesn’t blend */
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00e5ff, #ff4081);
  box-shadow: 0 0 8px #00e5ff, 0 0 12px #ff4081; /* soft glow */
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: #00bcd4 #0a0a0a; /* thumb / track */
}

/* ============================= */
/* 🌌 HEADER GLOW ENHANCEMENT */
/* ============================= */
header h1, .header-title, .main-title {
  text-shadow: 0 0 10px rgba(156, 39, 176, 0.8),
               0 0 20px rgba(0, 188, 212, 0.8);
  animation: headerGlow 3s ease-in-out infinite alternate;
}

@keyframes headerGlow {
  from {
    text-shadow: 0 0 5px rgba(156, 39, 176, 0.6),
                 0 0 15px rgba(0, 188, 212, 0.6);
  }
  to {
    text-shadow: 0 0 15px rgba(156, 39, 176, 1),
                 0 0 30px rgba(0, 188, 212, 1),
                 0 0 45px rgba(255, 64, 129, 0.8);
  }
}
/* GLOBAL SCROLLBAR STYLE */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a; /* darker background */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00bcd4, #9c27b0);
  border-radius: 10px;
  border: 2px solid #0a0a0a; /* creates separation for visibility */
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00e5ff, #ff4081);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #00bcd4 #0a0a0a;
}


