/* genpatsu.io - Nuclear Energy Monitoring HUD */
/* Palette: #0a0f14, #111b27, #22c55e, #f59e0b, #ef4444, #e2e8f0, #1e293b, #1e3a5f */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0f14;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ===================== GRID BACKGROUND ===================== */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(30, 58, 95, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 95, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ===================== SCAN LINE ===================== */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.15), transparent);
    pointer-events: none;
    z-index: 9999;
    animation: scanMove 8s linear infinite;
    opacity: 0.6;
}

@keyframes scanMove {
    0% { top: -2px; }
    100% { top: 100vh; }
}

/* ===================== SECTION BASE ===================== */
section {
    position: relative;
    z-index: 1;
}

/* ===================== BOOT SECTION ===================== */
.boot-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.boot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 600px;
    width: 100%;
}

/* Init lines */
.system-init {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.init-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #22c55e;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.init-line.active {
    opacity: 1;
    transform: translateX(0);
}

/* Brand container */
.brand-container {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.brand-container.visible {
    opacity: 1;
    transform: scale(1);
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    color: #e2e8f0;
    letter-spacing: -0.02em;
}

.brand-dot {
    color: #22c55e;
}

/* Atom icon */
.atom-icon {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.atom-nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.atom-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 50%;
}

.atom-orbit-1 {
    width: 40px;
    height: 16px;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: atomSpin 6s linear infinite;
}

.atom-orbit-2 {
    width: 40px;
    height: 16px;
    transform: translate(-50%, -50%) rotate(60deg);
    animation: atomSpin 6s linear infinite reverse;
}

.atom-orbit-3 {
    width: 40px;
    height: 16px;
    transform: translate(-50%, -50%) rotate(120deg);
    animation: atomSpin 8s linear infinite;
}

@keyframes atomSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.atom-orbit-1 { animation: atomSpin1 6s linear infinite; }
.atom-orbit-2 { animation: atomSpin2 6s linear infinite; }
.atom-orbit-3 { animation: atomSpin3 8s linear infinite; }

@keyframes atomSpin1 {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes atomSpin2 {
    0% { transform: translate(-50%, -50%) rotate(60deg); }
    100% { transform: translate(-50%, -50%) rotate(420deg); }
}
@keyframes atomSpin3 {
    0% { transform: translate(-50%, -50%) rotate(120deg); }
    100% { transform: translate(-50%, -50%) rotate(480deg); }
}

/* Status indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.status-indicator.visible {
    opacity: 1;
}

.status-dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    flex-shrink: 0;
}

.green-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.status-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #22c55e;
    letter-spacing: 0.15em;
}

/* Hero gauge */
.hero-gauge {
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-gauge.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===================== GAUGE SYSTEM ===================== */
.gauge {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gauge-lg {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.gauge-sm {
    width: 80px;
    height: 80px;
}

.gauge-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#22c55e 0% 0%, #1e293b 0% 100%);
    transition: background 1.5s ease;
}

.gauge-inner {
    position: relative;
    z-index: 1;
    border-radius: 50%;
    background: #0a0f14;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-lg .gauge-inner {
    width: 84px;
    height: 84px;
}

.gauge-sm .gauge-inner {
    width: 56px;
    height: 56px;
}

.gauge-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 500;
    color: #e2e8f0;
}

.gauge-value small {
    font-size: 0.7rem;
    color: #6b8ea8;
}

.gauge-value-sm {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    color: #e2e8f0;
}

.gauge-caption {
    display: block;
    margin-top: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #6b8ea8;
    letter-spacing: 0.05em;
}

.gauge-label {
    display: block;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: #6b8ea8;
    letter-spacing: 0.03em;
    text-align: center;
}

/* ===================== MONITORING SECTION ===================== */
.monitor-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.heading-marker {
    width: 3px;
    height: 16px;
    background: #22c55e;
    display: inline-block;
    border-radius: 1px;
}

/* Panels grid */
.panels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (max-width: 640px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: #111b27;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.3s ease;
}

.panel:hover {
    border-color: #22c55e;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.panel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #e2e8f0;
}

.status-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 3px;
}

.status-chip.green {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-chip.amber {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-chip.red {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.panel-body {
    margin-bottom: 0.75rem;
}

.panel-metric {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 500;
    color: #22c55e;
    line-height: 1;
}

.metric-unit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #6b8ea8;
}

.panel-desc {
    font-size: 0.75rem;
    color: #6b8ea8;
    line-height: 1.5;
}

.panel-footer {
    border-top: 1px solid rgba(30, 58, 95, 0.5);
    padding-top: 0.5rem;
}

.panel-ts {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: #4a6a83;
}

/* Panel with amber metric value */
.panel[data-panel="radiation"] .metric-value {
    color: #f59e0b;
}

/* ===================== GAUGE CLUSTER ===================== */
.gauge-cluster-heading {
    margin-top: 1rem;
}

.gauge-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: #111b27;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
}

.gauge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===================== ALERTS SECTION ===================== */
.alerts-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem;
}

.alert-feed {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.alert-entry {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
    background: rgba(17, 27, 39, 0.5);
    transition: background 0.2s ease;
}

.alert-entry:hover {
    background: rgba(17, 27, 39, 0.9);
}

.alert-entry[data-severity="green"] {
    border-left-color: #22c55e;
}

.alert-entry[data-severity="amber"] {
    border-left-color: #f59e0b;
}

.alert-entry[data-severity="red"] {
    border-left-color: #ef4444;
}

.alert-severity {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.alert-entry[data-severity="green"] .alert-severity {
    background: #22c55e;
}

.alert-entry[data-severity="amber"] .alert-severity {
    background: #f59e0b;
}

.alert-entry[data-severity="red"] .alert-severity {
    background: #ef4444;
}

.alert-timestamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #6b8ea8;
    flex-shrink: 0;
    min-width: 60px;
}

.alert-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* ===================== STATUS REPORT SECTION ===================== */
.report-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

.report-panel {
    background: #111b27;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    overflow: hidden;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(30, 58, 95, 0.5);
    background: rgba(10, 15, 20, 0.5);
}

.report-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    color: #94a3b8;
    letter-spacing: 0.12em;
}

.report-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #6b8ea8;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid rgba(30, 58, 95, 0.5);
}

@media (max-width: 640px) {
    .report-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.report-stat {
    padding: 1rem 1.25rem;
    border-right: 1px solid rgba(30, 58, 95, 0.3);
    text-align: center;
}

.report-stat:last-child {
    border-right: none;
}

.stat-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: #6b8ea8;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;
}

.green-text {
    color: #22c55e;
}

.red-text {
    color: #ef4444;
}

.report-body {
    padding: 1.25rem;
}

.report-body p {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.report-body p:last-child {
    margin-bottom: 0;
}

.report-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(30, 58, 95, 0.5);
    background: rgba(10, 15, 20, 0.5);
    text-align: center;
}

.report-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #22c55e;
    letter-spacing: 0.1em;
}

/* Monitoring continues text */
.monitoring-continues {
    text-align: center;
    margin-top: 3rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #4a6a83;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 1s ease;
}

.monitoring-continues.visible {
    opacity: 1;
}

/* ===================== FADE IN ANIMATION ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0f14;
}

::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* ===================== SELECTION ===================== */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: #e2e8f0;
}
