/* CluckCycle - Futuristic Bio-Lab Theme */

:root {
  --bg-primary: #0b0e10;
  --bg-secondary: #1a1f26;
  --hud-glow: #00ffc3;
  --amber-glow: #ffab00;
  --alert-glow: #ff3c3c;
  /* Accent aliases used throughout styles */
  --accent-aqua: var(--hud-glow);
  --accent-amber: var(--amber-glow);
  --accent-red: var(--alert-glow);
  --panel-bg: rgba(0, 255, 195, 0.05);
  --panel-border: rgba(0, 255, 195, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #8892b0;
  --text-muted: #495670;
}

/* Temporary highlight when navigating to Batches */
.work-area.highlight {
  box-shadow: 0 0 0 2px var(--hud-glow), 0 0 25px rgba(0, 255, 195, 0.5);
  transition: box-shadow 0.3s ease;
}

/* (Removed) Test override that forced a single image */

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

body {
  font-family: 'Orbitron', monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Navigation HUD */
.nav-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 14, 16, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 4px 20px rgba(0, 255, 195, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  flex-direction: column;
}

.brand-glow {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--hud-glow);
  text-shadow: 0 0 10px var(--hud-glow);
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

.brand-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 400;
}

.nav-link:hover,
.nav-link.active {
  color: var(--hud-glow);
  border-color: var(--panel-border);
  background: var(--panel-bg);
  box-shadow: 0 0 15px rgba(0, 255, 195, 0.2);
}

.nav-icon {
  font-size: 1.2rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--hud-glow), var(--amber-glow));
  border: 2px solid var(--panel-border);
}

.user-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--hud-glow);
  transition: 0.3s;
}

/* Main Lab Interface */
.lab-container {
  margin-top: 80px;
  padding: 2rem;
  min-height: calc(100vh - 80px);
}

.lab-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Work Area */
.work-area {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hud-glow);
  text-shadow: 0 0 10px var(--hud-glow);
  letter-spacing: 1px;
}

.hud-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hud-btn.primary {
  border-color: var(--hud-glow);
  color: var(--hud-glow);
}

.hud-btn:hover {
  background: var(--panel-bg);
  box-shadow: 0 0 20px rgba(0, 255, 195, 0.3);
  transform: translateY(-2px);
}

.btn-glow {
  position: relative;
  z-index: 1;
}

/* Specimen Grid */
.specimen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Egg HUD Rings */
.egg-hud {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.hud-ring {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 195, 0.1) 0%, transparent 70%);
  border: 2px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-progress {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 204px;
  height: 204px;
  border-radius: 50%;
  background: conic-gradient(
    var(--ring-color, var(--hud-glow)) 0deg,
    var(--ring-color, var(--hud-glow)) calc(var(--progress, 0) * 3.6deg),
    transparent calc(var(--progress, 0) * 3.6deg),
    transparent 360deg
  );
  mask: radial-gradient(circle, transparent 90px, black 92px);
  animation: pulse-ring 2.6s ease-in-out infinite alternate, rotate-slow 20s linear infinite;
}

/* Critical state: stronger pulse near completion */
.hud-ring.critical .ring-progress {
  animation: pulse-critical 1s ease-in-out infinite alternate, rotate-slow 20s linear infinite;
}

.egg-container {
  position: relative;
  width: 80px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.egg-image {
  width: 60px;
  height: 80px;
  background: linear-gradient(145deg, #f5f5dc 0%, #e6ddd4 50%, #d4c4a8 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 
    inset -5px -5px 10px rgba(0, 0, 0, 0.2),
    inset 5px 5px 10px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(0, 255, 195, 0.3);
  position: relative;
  z-index: 2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Subtle pulsing glow (alternate to avoid loop stutter) */
  will-change: box-shadow;
  animation: egg-glow 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* Real egg image option - uncomment to use actual photos */
/*
.egg-image {
  width: 60px;
  height: 80px;
  background-image: url('images/egg-realistic.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 255, 195, 0.3);
  position: relative;
.crack-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* Pulsing glow aura around the egg (stronger when critical) */
.egg-image::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  pointer-events: none;
  z-index: 1;
  box-shadow:
    0 0 18px rgba(0, 255, 195, 0.18),
    0 0 36px rgba(0, 255, 195, 0.12),
    0 0 54px rgba(0, 255, 195, 0.08);
  opacity: 0.6;
  transform: scale(1);
  will-change: opacity, transform, box-shadow;
  animation: egg-glow-aura 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.hud-ring.critical .egg-image::after {
  box-shadow:
    0 0 22px rgba(255, 171, 0, 0.28),
    0 0 44px rgba(255, 171, 0, 0.18),
    0 0 70px rgba(255, 60, 60, 0.15);
  animation: egg-glow-aura-strong 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* Phase-synced glow & ring speeds */
.hud-ring.phase-incubation .egg-image::after {
  box-shadow:
    0 0 18px rgba(0, 255, 195, 0.22),
    0 0 36px rgba(0, 255, 195, 0.14),
    0 0 54px rgba(0, 255, 195, 0.10);
  animation-duration: 3.0s;
}
.hud-ring.phase-incubation .egg-image { animation-duration: 3.0s; }
.hud-ring.phase-incubation .ring-progress {
  animation-duration: 3.0s, 20s; /* pulse, rotate */
}

.hud-ring.phase-pre-hatch .egg-image::after {
  box-shadow:
    0 0 22px rgba(255, 171, 0, 0.28),
    0 0 44px rgba(255, 171, 0, 0.18),
    0 0 60px rgba(255, 171, 0, 0.12);
  animation-duration: 2.0s;
}
.hud-ring.phase-pre-hatch .egg-image { animation-duration: 2.0s; }
.hud-ring.phase-pre-hatch .ring-progress {
  animation-duration: 2.0s, 20s;
}

.hud-ring.phase-hatching .egg-image::after {
  box-shadow:
    0 0 26px rgba(255, 171, 0, 0.32),
    0 0 52px rgba(255, 60, 60, 0.22),
    0 0 80px rgba(255, 60, 60, 0.15);
  animation-duration: 1.4s;
}
.hud-ring.phase-hatching .egg-image { animation-duration: 1.4s; }
.hud-ring.phase-hatching .ring-progress {
  animation-duration: 1.4s, 20s;
}

.hud-ring.phase-overdue .egg-image::after {
  box-shadow:
    0 0 24px rgba(255, 60, 60, 0.32),
    0 0 60px rgba(255, 60, 60, 0.22),
    0 0 90px rgba(255, 60, 60, 0.18);
  animation-duration: 1.2s;
}
.hud-ring.phase-overdue .egg-image { animation-duration: 1.2s; }
.hud-ring.phase-overdue .ring-progress {
  animation-duration: 1.2s, 20s;
}

/* Event reminder overrides (take precedence over phase colors) */
.hud-ring.event-amber { --ring-color: var(--amber-glow); }
.hud-ring.event-red { --ring-color: var(--alert-glow); }

.hud-ring.event-amber .egg-image::after {
  box-shadow:
    0 0 26px rgba(255, 171, 0, 0.40),
    0 0 52px rgba(255, 171, 0, 0.26),
    0 0 80px rgba(255, 171, 0, 0.20) !important;
}

.hud-ring.event-red .egg-image::after {
  box-shadow:
    0 0 28px rgba(255, 60, 60, 0.46),
    0 0 60px rgba(255, 60, 60, 0.30),
    0 0 90px rgba(255, 60, 60, 0.24) !important;
}

/* Small event badge/button on the HUD ring */
.event-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(0,0,0,0.65);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 10px;
  display: none;
  align-items: center;
  gap: 4px;
  z-index: 3;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  cursor: pointer;
  user-select: none;
}

.hud-ring.event-amber .event-badge,
.hud-ring.event-red .event-badge {
  display: inline-flex;
}

.event-badge.amber { border-color: var(--amber-glow); color: var(--amber-glow); }
.event-badge.red { border-color: var(--alert-glow); color: var(--alert-glow); }

.event-badge:hover { transform: translateY(-1px); }

.debug-controls {
  position: absolute;
  bottom: -68px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(0,0,0,0.5);
  border: 1px dashed var(--panel-border);
  border-radius: 8px;
  z-index: 2;
}

.dbg-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.dbg-btn:hover {
  color: var(--text-primary);
  border-color: var(--hud-glow);
  box-shadow: 0 0 10px rgba(0, 255, 195, 0.15);
}

.crack-1::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 45%;
  width: 2px;
  height: 20px;
  background: #8b4513;
  transform: rotate(15deg);
  box-shadow: 0 0 5px rgba(139, 69, 19, 0.8);
}

.crack-2::before {
  content: '';
  position: absolute;
  top: 45%;
  right: 40%;
  width: 1px;
  height: 15px;
  background: #8b4513;
  transform: rotate(-20deg);
  box-shadow: 0 0 5px rgba(139, 69, 19, 0.8);
}

.crack-3::before {
  content: '';
  position: absolute;
  top: 25%;
  right: 35%;
  width: 1px;
  height: 12px;
  background: #8b4513;
  transform: rotate(45deg);
  box-shadow: 0 0 5px rgba(139, 69, 19, 0.8);
}

.hud-data {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
}

.specimen-id {
  font-size: 1rem;
  font-weight: bold;
  color: var(--hud-glow);
  margin-bottom: 0.25rem;
}

.specimen-breed {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.specimen-progress {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--amber-glow);
  margin-bottom: 0.25rem;
}

.specimen-status {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 255, 195, 0.2);
  color: var(--hud-glow);
  border: 1px solid var(--hud-glow);
}

.specimen-status.critical {
  background: rgba(255, 60, 60, 0.2);
  color: var(--alert-glow);
  border-color: var(--alert-glow);
  animation: blink-critical 1s ease-in-out infinite alternate;
}

/* Control Sidebar */
.control-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.control-panel .panel-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
}

.control-panel .panel-title {
  font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  position: relative;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--hud-glow);
  text-shadow: 0 0 10px var(--hud-glow);
}

.stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

.stat-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hud-glow);
  animation: pulse-dot 2s ease-in-out infinite alternate;
}

.stat-indicator.success {
  background: #00ff88;
}

/* Panel Header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.temp-toggle {
  background: rgba(0, 255, 195, 0.1);
  border: 1px solid var(--accent-aqua);
  border-radius: 15px;
  padding: 5px 10px;
  color: var(--accent-aqua);
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 35px;
}

.temp-toggle:hover {
  background: rgba(0, 255, 195, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 195, 0.3);
  transform: scale(1.05);
}

.temp-unit {
  font-weight: bold;
}

/* Environmental Controls */
.env-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.env-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.env-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1px;
}

.env-value {
  font-size: 1.2rem;
  color: var(--accent-aqua);
  font-weight: bold;
  font-family: 'Orbitron', monospace;
}

.env-value.turning-active {
  color: var(--accent-amber);
  animation: pulse 2s infinite;
}

.env-target {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: 'Share Tech Mono', monospace;
  opacity: 0.7;
}

.env-bar {
  height: 4px;
  background: rgba(0, 255, 195, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.env-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-aqua), var(--accent-amber));
  transition: width 0.3s ease;
}

/* Phase-specific status colors */
.specimen-status.pre-incubation {
  color: var(--text-secondary);
}

.specimen-status.incubation {
  color: var(--accent-aqua);
}

.specimen-status.pre-hatch {
  color: var(--accent-amber);
}

.specimen-status.hatching {
  color: var(--accent-amber);
  animation: pulse 1s infinite;
}

.specimen-status.overdue {
  color: var(--accent-red);
  animation: pulse 0.5s infinite;
}

/* Hatch Schedule */
.hatch-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hatch-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.hatch-item.urgent {
  border-color: var(--alert-glow);
  background: rgba(255, 60, 60, 0.1);
}

.hatch-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hud-glow);
  animation: pulse-dot 2s ease-in-out infinite alternate;
}

.hatch-item.urgent .hatch-indicator {
  background: var(--alert-glow);
  animation: blink-critical 1s ease-in-out infinite alternate;
}

.hatch-info {
  flex: 1;
}

.hatch-breed {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.hatch-time {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--amber-glow);
  margin-bottom: 0.25rem;
}

.hatch-count {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Reports Page: Constrain chart height */
.reports-content .chart-wrap {
  max-height: 50vh;
}

.reports-content #reportsChart {
  height: 50vh;      /* visual height ~ half screen */
  max-height: 50vh;
  display: block;    /* remove inline baseline gap */
}

/* Background Effects */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 195, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 195, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
}

.particle-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 255, 195, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 171, 0, 0.1) 0%, transparent 50%);
  animation: particle-drift 30s ease-in-out infinite alternate;
}

/* Animations */
@keyframes pulse-glow {
  0% { text-shadow: 0 0 10px var(--hud-glow); }
  100% { text-shadow: 0 0 20px var(--hud-glow), 0 0 30px var(--hud-glow); }
}

/* Egg pulsing animations - smoother with mid-peak and symmetric ends */
@keyframes egg-glow {
  0% {
    box-shadow:
      inset -5px -5px 10px rgba(0, 0, 0, 0.2),
      inset 5px 5px 10px rgba(255, 255, 255, 0.3),
      0 0 14px rgba(0, 255, 195, 0.26);
  }
  50% {
    box-shadow:
      inset -5px -5px 10px rgba(0, 0, 0, 0.2),
      inset 5px 5px 12px rgba(255, 255, 255, 0.45),
      0 0 46px rgba(0, 255, 195, 0.75);
  }
  100% {
    box-shadow:
      inset -5px -5px 10px rgba(0, 0, 0, 0.2),
      inset 5px 5px 10px rgba(255, 255, 255, 0.3),
      0 0 14px rgba(0, 255, 195, 0.26);
  }
}

@keyframes egg-glow-aura {
  0% { opacity: 0.38; transform: scale(0.985); }
  50% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0.38; transform: scale(0.985); }
}

@keyframes egg-glow-aura-strong {
  0% { opacity: 0.5; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0.5; transform: scale(0.98); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

@keyframes pulse-critical {
  0% { opacity: 0.6; box-shadow: 0 0 20px var(--alert-glow); }
  100% { opacity: 1; box-shadow: 0 0 40px var(--alert-glow); }
}

@keyframes blink-critical {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes pulse-dot {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.2); }
}

@keyframes shimmer {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

@keyframes ripple-effect {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes particle-drift {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(2deg); }
}

/* Intensified pre-hatch pulsing visuals (Day 18–21) */
.hud-ring.pre-hatch-intense {
  animation: intense-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 30px var(--amber-glow), 0 0 60px rgba(255,171,0,0.35), inset 0 0 30px rgba(255,171,0,0.25);
}
.hud-ring.pre-hatch-intense .egg-image {
  animation: egg-breathe 1.2s ease-in-out infinite;
}

@keyframes intense-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,171,0,0)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(255,171,0,0.6)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,171,0,0)); }
}

@keyframes egg-breathe {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* System Alert Styles */
.system-alert {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  z-index: 4000;
  min-width: 300px;
  max-width: 400px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.system-alert.active {
  transform: translateX(0);
  opacity: 1;
}

.system-alert.success {
  border-color: var(--hud-glow);
  box-shadow: 0 0 20px rgba(0, 255, 195, 0.3);
}

.system-alert.error {
  border-color: var(--alert-glow);
  box-shadow: 0 0 20px rgba(255, 60, 60, 0.3);
}

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

.alert-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.system-alert.success .alert-icon {
  color: var(--hud-glow);
}

.system-alert.error .alert-icon {
  color: var(--alert-glow);
}

.alert-message {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-secondary);
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.8) translateY(50px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(0, 255, 195, 0.05);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hud-glow);
  text-shadow: 0 0 10px var(--hud-glow);
  letter-spacing: 1px;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 60, 60, 0.2);
  color: var(--alert-glow);
  transform: rotate(90deg);
}

.modal-content {
  padding: 2rem;
}

/* Readability improvements for guide/article content */
.modal-content p {
  margin: 0 0 0.9rem 0;
  line-height: 1.6;
}

.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content h5,
.modal-content h6 {
  margin-top: 1.1rem;
  margin-bottom: 0.6rem;
}

.modal-content ul,
.modal-content ol {
  margin: 0.8rem 0 1rem 1.25rem;
  padding-left: 1rem;
}

.modal-content li {
  margin: 0.4rem 0;
  line-height: 1.6;
}

/* Form Styles */
.form-group {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--hud-glow);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 5px var(--hud-glow);
}

.batch-id-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber-glow);
  text-shadow: 0 0 10px var(--amber-glow);
}

.regenerate-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.regenerate-btn:hover {
  border-color: var(--hud-glow);
  color: var(--hud-glow);
  background: rgba(0, 255, 195, 0.1);
  transform: rotate(180deg);
}

.input-container {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--hud-glow);
  background: rgba(0, 255, 195, 0.05);
  box-shadow: 0 0 20px rgba(0, 255, 195, 0.2);
}

.input-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(45deg, transparent, var(--hud-glow), transparent);
  transition: opacity 0.3s ease;
}

.form-input:focus + .input-glow {
  opacity: 0.1;
}

.datetime-display {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: center;
}

.form-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

.hud-btn.secondary {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.hud-btn.secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.hud-btn.danger {
  border-color: var(--alert-glow);
  color: var(--alert-glow);
}

.hud-btn.danger:hover {
  background: rgba(255, 60, 60, 0.1);
  box-shadow: 0 0 20px rgba(255, 60, 60, 0.3);
  transform: translateY(-2px);
}

/* Specimen Actions */
.specimen-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

/* Delete Confirmation Modal */
.delete-confirm .modal-container {
  border-color: var(--alert-glow);
  box-shadow: 0 20px 60px rgba(255, 60, 60, 0.3);
}

.delete-confirm .modal-header {
  background: rgba(255, 60, 60, 0.1);
  border-bottom-color: var(--alert-glow);
}

.confirm-message {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.confirm-icon {
  font-size: 3rem;
  color: var(--alert-glow);
  text-shadow: 0 0 10px var(--alert-glow);
}

.confirm-text p {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.warning-text {
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .lab-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .control-sidebar {
    order: -1;
  }
  
  .specimen-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 14, 16, 0.98);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--panel-border);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .lab-container {
    padding: 1rem;
  }
  
  .specimen-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Smaller chart on mobile */
  .reports-content .chart-wrap {
    max-height: 40vh;
  }
  .reports-content #reportsChart {
    height: 40vh;
    max-height: 40vh;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 1rem;
  }
  
  .brand-glow {
    font-size: 1.2rem;
  }
  
  .hud-ring {
    width: 160px;
    height: 160px;
  }
  
  .ring-progress {
    width: 164px;
    height: 164px;
  }
}
