/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES
   ========================================================================== */
:root {
    --bg-dark: #0a0c10;
    --bg-card: rgba(22, 28, 41, 0.65);
    --bg-card-hover: rgba(29, 37, 54, 0.8);
    --border-color: rgba(44, 53, 74, 0.5);
    --border-color-glow: rgba(255, 90, 0, 0.3);
    
    /* Brand Colors */
    --color-orange: #ff5a00;
    --color-orange-glow: rgba(255, 90, 0, 0.6);
    --color-orange-dark: #cc3700;
    --color-yellow: #ffd700;
    --color-red: #ff3300;
    --color-cyan: #00d2ff;
    --color-green: #00ff66;
    
    /* Text Colors */
    --text-primary: #f0f4f8;
    --text-secondary: #a4b0c6;
    --text-muted: #62728f;
    
    /* Shadows & Blurs */
    --glass-blur: blur(12px);
    --box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --glow-shadow: 0 0 15px rgba(255, 90, 0, 0.3);
    
    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #1c2333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-orange);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--color-orange);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-yellow);
    text-shadow: 0 0 8px var(--color-orange-glow);
}

/* ==========================================================================
   REUSABLE COMPONENTS
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 90, 0, 0.15);
    border: 1px solid rgba(255, 90, 0, 0.3);
    color: var(--color-orange);
}

.badge.glow-orange {
    box-shadow: 0 0 10px rgba(255, 90, 0, 0.2);
}

.badge.glow-green {
    background: rgba(0, 255, 102, 0.1);
    border-color: rgba(0, 255, 102, 0.3);
    color: var(--color-green);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.badge.version-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(164, 176, 198, 0.2);
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.02em;
}

.hero-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 90, 0, 0.25);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    gap: 16px;
}

.header-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-header h2 {
    font-size: 1.35rem;
    color: var(--text-primary);
}

/* ==========================================================================
   HERO / HEADER
   ========================================================================== */
.hero {
    position: relative;
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(135deg, #100a08 0%, #151a24 100%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(ellipse at 50% 50%, rgba(255, 77, 0, 0.08) 0%, transparent 70%),
        radial-gradient(circle at 20% 30%, rgba(0, 210, 255, 0.04) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin: 16px 0;
    background: linear-gradient(135deg, #fff 30%, #ff8a00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 36px;
    font-weight: 300;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-card {
    background: rgba(22, 28, 41, 0.45);
    border: 1px solid rgba(44, 53, 74, 0.4);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-orange);
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.warning-pulse {
    animation: borderPulse 2s infinite alternate;
}

@keyframes borderPulse {
    0% { border-color: rgba(255, 90, 0, 0.2); box-shadow: 0 0 5px rgba(255, 90, 0, 0.05); }
    100% { border-color: rgba(255, 90, 0, 0.6); box-shadow: 0 0 15px rgba(255, 90, 0, 0.2); }
}

.text-orange {
    color: var(--color-orange) !important;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.section-nav {
    display: flex;
    justify-content: center;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 24px;
    gap: 16px;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
    color: var(--color-orange);
    background: rgba(255, 90, 0, 0.08);
    border-color: rgba(255, 90, 0, 0.25);
}

.nav-btn .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ==========================================================================
   MAIN LAYOUT & GRID
   ========================================================================== */
.main-container {
    max-width: 1550px;
    margin: 40px auto;
    padding: 0 24px;
    width: 100%;
    flex: 1;
    transition: var(--transition);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

.grid-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 28px;
    align-items: start;
}

.grid-layout.single-col {
    grid-template-columns: 1fr;
}

/* ==========================================================================
   INTERACTIVE SVG MAP
   ========================================================================== */
.map-container {
    display: flex;
    flex-direction: column;
}

.map-legend {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.active-fissure {
    background-color: var(--color-red);
    box-shadow: 0 0 6px var(--color-red);
}

.legend-dot.lava-field {
    background-color: #3a251e;
    border: 1px solid #ff7300;
}

.layer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(10, 12, 16, 0.4);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.control-btn {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    user-select: none;
    transition: var(--transition);
}

.control-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Custom Checkbox within Glow controls */
.glow-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--text-muted);
    border-radius: 3px;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}

.glow-checkbox input:checked ~ .checkbox-custom {
    background-color: var(--color-orange);
    border-color: var(--color-orange);
    box-shadow: 0 0 8px rgba(255, 90, 0, 0.6);
}

.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 3.5px;
    top: 0.5px;
    width: 3px;
    height: 6px;
    border: solid #ffffff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.glow-checkbox input:checked ~ .checkbox-custom:after {
    display: block;
}

.svg-map-wrapper {
    position: relative;
    background-color: #0b0e14;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    aspect-ratio: 800 / 500;
}

/* SVG styling */
#reykjanes-svg-map {
    display: block;
}

.map-layer {
    transition: var(--transition);
}

#roads path {
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

#roads path:hover {
    opacity: 0.95;
}

#barriers path {
    opacity: 0.85;
}

.map-layer.hidden {
    opacity: 0;
    pointer-events: none;
}

.lava-field-polygon {
    transition: all 0.5s ease-out;
}

.lava-field-polygon.active {
    fill: url(#lava-glow-grad) !important;
    stroke: var(--color-yellow) !important;
    filter: url(#glow-effect);
}

.fissure-line {
    opacity: 0;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: opacity 0.3s ease;
}

.fissure-line.active {
    opacity: 1;
    stroke-dashoffset: 0;
    animation: fissureBurn 2s infinite alternate, drawLine 1s ease-out forwards;
    filter: url(#intense-glow);
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes fissureBurn {
    0% { stroke: #ff3c00; stroke-width: 4.5px; }
    50% { stroke: #ff9d00; stroke-width: 6.5px; }
    100% { stroke: #ffffff; stroke-width: 5px; }
}

/* Point markers styles */
.poi-marker circle {
    transition: var(--transition);
}

.poi-marker .ping {
    animation: pulsePing 2s infinite ease-in-out;
    transform-origin: center;
}

@keyframes pulsePing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.8); opacity: 0; }
}

/* SVG Text labels */
.map-labels-group text {
    fill: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    pointer-events: none;
    letter-spacing: 0.02em;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.95);
}

.label-town {
    fill: var(--text-primary) !important;
    font-weight: 700 !important;
}

.label-poi {
    fill: var(--color-cyan) !important;
    font-size: 10px !important;
}

.label-system {
    font-family: 'Outfit', sans-serif;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em;
    fill: var(--color-orange) !important;
}

.text-anchor-middle {
    text-anchor: middle;
}

/* ==========================================================================
   TIMELINE CONTROLS & SIDEBAR
   ========================================================================== */
.timeline-container {
    display: flex;
    flex-direction: column;
}

.player-controls {
    display: flex;
    gap: 8px;
}

.control-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.control-circle-btn:hover {
    background: rgba(255, 90, 0, 0.1);
    border-color: var(--color-orange);
    color: var(--color-orange);
    box-shadow: 0 0 10px rgba(255, 90, 0, 0.15);
}

.play-btn {
    background: rgba(255, 90, 0, 0.15);
    border-color: rgba(255, 90, 0, 0.35);
    color: var(--color-orange);
}

.play-btn:hover {
    background: var(--color-orange);
    color: #fff;
}

.hidden {
    display: none !important;
}

.timeline-strip {
    display: flex;
    justify-content: space-between;
    background: rgba(10, 12, 16, 0.4);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
    gap: 6px;
}

.strip-node {
    flex: 1;
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.strip-node:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.strip-node.active {
    background: var(--color-orange);
    color: #ffffff;
    box-shadow: 0 0 10px var(--color-orange-glow);
}

/* Details Panel styling */
.eruption-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 380px;
}

.details-top {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.gos-system-badge {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--color-cyan);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 8px;
}

.eruption-details h3 {
    font-size: 1.45rem;
    color: #fff;
    margin-bottom: 6px;
}

.details-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.data-box {
    background: rgba(10, 12, 16, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.data-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--color-orange);
    opacity: 0.5;
}

.data-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.data-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.data-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.details-body {
    padding-top: 10px;
}

.section-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

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

.educational-card {
    background: rgba(255, 215, 0, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 10px;
    padding: 16px;
}

.edu-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--color-yellow);
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.educational-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.geology-precursors-card {
    background: rgba(0, 210, 255, 0.03);
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.geo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    border-bottom: 1px dashed rgba(44, 53, 74, 0.4);
    padding-bottom: 10px;
}

.geo-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.geo-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.geo-stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-cyan);
}

.geo-note-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   MAGMA SIMULATOR (SECTION 2)
   ========================================================================== */
.sim-display-card {
    display: flex;
    flex-direction: column;
}

.sim-visual-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    background: linear-gradient(to bottom, #090c12 0%, #1a100a 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
}

/* Ground Line representation */
.ground-layer {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 10;
}

.ground-line {
    width: 100%;
    height: 4px;
    background: #364156;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.crust-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gps-station {
    position: absolute;
    top: -24px;
    left: 15%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gps-antenna {
    width: 8px;
    height: 16px;
    background: #a4b0c6;
    border-top: 4px solid var(--color-cyan);
    position: relative;
}

.gps-antenna::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 2px;
    background: var(--color-cyan);
    top: 4px;
    left: -4px;
}

.gps-label {
    font-size: 8px;
    color: var(--text-secondary);
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    border: 0.5px solid var(--border-color);
}

/* Conduit vertical path */
.magma-conduit {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 180px;
    background: #11141c;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    z-index: 5;
    transition: var(--transition);
}

.magma-conduit.active {
    background: linear-gradient(to top, var(--color-red), var(--color-orange));
    box-shadow: 0 0 15px var(--color-orange-glow);
    border-color: var(--color-yellow);
}

/* Chamber */
.magma-chamber-wrapper {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
}

.magma-chamber {
    width: 160px;
    height: 100px;
    border-radius: 50% 50% 45% 45%;
    border: 2px solid var(--border-color);
    background: #0f121a;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
    transition: var(--transition);
}

.magma-chamber.high-pressure {
    border-color: var(--color-red);
    box-shadow: inset 0 0 20px rgba(255, 51, 0, 0.2), 0 0 15px rgba(255, 51, 0, 0.1);
}

.magma-fluid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%; /* Dynamic fill */
    background: linear-gradient(to top, var(--color-red) 20%, var(--color-orange) 80%);
    opacity: 0.85;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px var(--color-orange-glow);
}

.chamber-label {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 12;
}

/* Simulator HUD display overlay */
.sim-overlay-hud {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(10, 12, 16, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    z-index: 20;
    backdrop-filter: var(--glass-blur);
}

.hud-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.75rem;
}

.hud-label {
    color: var(--text-secondary);
}

.hud-value {
    font-weight: 700;
    color: #fff;
    font-family: monospace;
}

/* Controls Column */
.sim-controls-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sim-description p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 4px;
}

.sim-guide-box {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    transition: var(--transition);
}

.sim-guide-box.warning-state {
    background: rgba(255, 51, 0, 0.08);
    border-color: rgba(255, 51, 0, 0.35);
}

.sim-guide-box.dyke-state {
    background: rgba(255, 215, 0, 0.06);
    border-color: rgba(255, 215, 0, 0.25);
}

.sim-guide-box.erupt-state {
    background: rgba(255, 90, 0, 0.08);
    border-color: rgba(255, 90, 0, 0.35);
}

.sim-guide-box .guide-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--color-cyan);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sim-guide-box.warning-state .guide-title {
    color: var(--color-red);
}

.sim-guide-box.dyke-state .guide-title {
    color: var(--color-yellow);
}

.sim-guide-box.erupt-state .guide-title {
    color: var(--color-orange);
}

.sim-guide-box p {
    color: var(--text-secondary);
    margin: 0;
}

.sim-guide-box strong {
    color: #fff;
}

.sim-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.sim-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transition: var(--transition);
}

.sim-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-muted);
}

.sim-btn.fill:not(:disabled) {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.3);
    color: var(--color-cyan);
}

.sim-btn.fill:not(:disabled):hover {
    background: var(--color-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.sim-btn.dyke:not(:disabled) {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--color-yellow);
}

.sim-btn.dyke:not(:disabled):hover {
    background: var(--color-yellow);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.sim-btn.erupt:not(:disabled) {
    background: rgba(255, 51, 0, 0.15);
    border-color: rgba(255, 51, 0, 0.35);
    color: var(--color-orange);
    animation: simBtnPulse 1.5s infinite alternate;
}

@keyframes simBtnPulse {
    0% { box-shadow: 0 0 5px var(--color-orange-glow); }
    100% { box-shadow: 0 0 15px rgba(255, 51, 0, 0.5); }
}

.sim-btn.erupt:not(:disabled):hover {
    background: var(--color-orange);
    color: #fff;
}

.sim-btn.reset {
    font-size: 0.8rem;
    padding: 8px;
    border-radius: 6px;
    border-color: transparent;
    color: var(--text-muted);
}

.sim-btn.reset:hover {
    color: var(--text-secondary);
}

.sim-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Sim Chart Area */
.sim-chart-container {
    background: rgba(10, 12, 16, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-top: 10px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-line {
    width: 14px;
    height: 3px;
    background: var(--color-orange);
    display: inline-block;
}

.chart-body {
    background: #07090d;
    border-radius: 6px;
    border: 1px solid rgba(44, 53, 74, 0.3);
    padding: 4px;
    height: 155px;
}

#chart-svg {
    display: block;
}

/* ==========================================================================
   SCIENCE SECTION (SECTION 3)
   ========================================================================== */
.science-content-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: center;
}

.science-text h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-cyan);
}

.science-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.science-text ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.science-text li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.alert-box {
    padding: 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.note-box {
    background: rgba(0, 210, 255, 0.05);
    border-left: 4px solid var(--color-cyan);
    border-top: 1px solid rgba(0, 210, 255, 0.1);
    border-right: 1px solid rgba(0, 210, 255, 0.1);
    border-bottom: 1px solid rgba(0, 210, 255, 0.1);
    color: var(--text-secondary);
}

.note-box strong {
    color: #fff;
}

/* Plate Tectonics Visual animation */
.science-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0b0e14;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 24px;
}

.plate-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 380px;
    height: 120px;
    position: relative;
}

.plate {
    width: 130px;
    height: 80px;
    background: #232c3f;
    border: 1.5px solid #3d4963;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 10;
}

.plate-left {
    animation: driftLeft 5s infinite ease-in-out;
}

.plate-right {
    animation: driftRight 5s infinite ease-in-out;
}

@keyframes driftLeft {
    0% { transform: translateX(0); }
    50% { transform: translateX(-15px); }
    100% { transform: translateX(0); }
}

@keyframes driftRight {
    0% { transform: translateX(0); }
    50% { transform: translateX(15px); }
    100% { transform: translateX(0); }
}

.plate-gap {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rising-magma-glow {
    width: 20px;
    height: 80px;
    background: linear-gradient(to top, var(--color-red), var(--color-orange));
    filter: blur(10px);
    opacity: 0.8;
    position: absolute;
    bottom: 10px;
    animation: magmaRise 3s infinite alternate;
}

@keyframes magmaRise {
    0% { transform: scaleY(0.7); opacity: 0.6; }
    100% { transform: scaleY(1.2); opacity: 0.95; }
}

.gap-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-orange);
    text-shadow: 0 0 5px rgba(255, 90, 0, 0.5);
    z-index: 12;
    margin-top: 10px;
}

.visual-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 24px;
    max-width: 320px;
}

/* ==========================================================================
   GLOSSARY SECTION
   ========================================================================== */
.glossary-section {
    margin-top: 56px;
    border-top: 1px solid var(--border-color);
    padding-top: 48px;
}

.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 36px;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.glossary-card {
    height: 150px;
    perspective: 1000px;
    cursor: pointer;
}

.glossary-front, .glossary-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.glossary-front {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    justify-content: space-between;
}

.glossary-back {
    background: rgba(255, 90, 0, 0.08);
    border: 1.5px solid var(--color-orange-glow);
    color: var(--text-primary);
    transform: rotateY(180deg);
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1.5;
}

.glossary-card.flipped .glossary-front {
    transform: rotateY(180deg);
}

.glossary-card.flipped .glossary-back {
    transform: rotateY(360deg);
}

.glossary-icon {
    font-size: 1.5rem;
}

.glossary-front h3 {
    font-size: 1.05rem;
    margin: 8px 0;
}

.read-more {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: #07090d;
    border-top: 1px solid var(--border-color);
    padding: 40px 24px;
    text-align: center;
    margin-top: 60px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.version-info {
    font-size: 0.75rem !important;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.sources-list {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.3rem;
    }
}

@media (max-width: 768px) {
    .section-nav {
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px 12px;
    }
    
    .nav-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    .science-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
}

/* Ground shaking animation for the simulator */
@keyframes shake {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-1px, -1px) rotate(-0.5deg); }
    20% { transform: translate(-2px, 0px) rotate(0.5deg); }
    30% { transform: translate(0px, -1px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(0.5deg); }
    55% { transform: translate(-1px, -1px) rotate(-0.5deg); }
    70% { transform: translate(-2px, -1px) rotate(0.5deg); }
    85% { transform: translate(1px, -1px) rotate(-0.5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* ==========================================================================
   FULLSCREEN STJÓRNSTÖÐVARHAMUR (CONTROL ROOM MODE)
   ========================================================================== */
body.fullscreen-active {
    overflow: hidden;
    height: 100vh;
}

body.fullscreen-active .hero,
body.fullscreen-active .section-nav,
body.fullscreen-active .footer {
    display: none !important;
}

body.fullscreen-active .main-container {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.fullscreen-active #timeline-section {
    width: 100vw;
    height: 100vh;
}

body.fullscreen-active .grid-layout {
    grid-template-columns: 1fr !important;
    width: 100vw;
    height: 100vh;
    gap: 0 !important;
}

body.fullscreen-active .map-container {
    border-radius: 0;
    border: none;
    height: 100vh;
    width: 100vw;
    padding: 24px;
    background-color: var(--bg-dark);
}

body.fullscreen-active .svg-map-wrapper {
    height: calc(100vh - 150px) !important;
    aspect-ratio: auto !important;
}

/* Floating panels in Fullscreen Control Room */
body.fullscreen-active .timeline-container {
    position: fixed;
    right: 24px;
    top: 24px;
    width: 440px;
    height: calc(100vh - 48px);
    z-index: 10000;
    overflow-y: auto;
    background: rgba(10, 12, 16, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(255, 90, 0, 0.45);
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.9);
    padding: 24px;
}

body.fullscreen-active .layer-controls {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: auto;
    z-index: 10000;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 90, 0, 0.25);
    margin-bottom: 0;
}

/* Exit Button in fullscreen mode */
body.fullscreen-active .fullscreen-btn {
    background: rgba(255, 51, 0, 0.15) !important;
    border-color: rgba(255, 51, 0, 0.4) !important;
    color: #ff4422 !important;
}

body.fullscreen-active .fullscreen-btn:hover {
    background: #ff3300 !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(255, 51, 0, 0.5);
}
