/* AstroGrass AI — Starlight Cosmic & Deep-Red Night-Vision Theme */
:root {
  --bg-dark: #060913;
  --bg-card: rgba(13, 19, 36, 0.75);
  --bg-card-hover: rgba(22, 31, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.5);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Deep Red Night-Vision Mode (Preserves Rhodopsin) --- */
body.night-vision {
  --bg-dark: #070000;
  --bg-card: rgba(26, 0, 0, 0.85);
  --bg-card-hover: rgba(45, 0, 0, 0.9);
  --border-subtle: rgba(255, 0, 0, 0.18);
  --border-active: rgba(255, 60, 60, 0.7);
  
  --text-main: #ff6666;
  --text-muted: #cc3333;
  --text-dim: #881111;
  
  --accent-cyan: #ff4444;
  --accent-cyan-glow: rgba(255, 0, 0, 0.3);
  --accent-purple: #ff2222;
  --accent-rose: #ff4444;
  --accent-amber: #dd2222;
  --accent-emerald: #bb2222;
}

body.night-vision .ambient-glow {
  background: radial-gradient(circle, #550000, #220000) !important;
  opacity: 0.15;
}

body.night-vision .btn-primary {
  background: linear-gradient(135deg, #cc1111, #880000) !important;
  color: #ffcccc !important;
  box-shadow: 0 4px 18px rgba(255, 0, 0, 0.3) !important;
}

body.night-vision .btn-redmode {
  background: rgba(255, 0, 0, 0.25) !important;
  border-color: #ff3333 !important;
  color: #ff8888 !important;
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.5) !important;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 60px;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient glow */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}

.glow-nebula {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #7c3aed, #1e1b4b);
  top: -120px;
  right: -80px;
}

.glow-aurora {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #0284c7, #082f49);
  bottom: 40px;
  left: -80px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 36px;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 18px var(--accent-cyan-glow);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-redmode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-redmode:hover {
  background: rgba(244, 63, 94, 0.25);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.35);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: #38bdf8;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-cyan-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-emerald-glow);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.btn-ghost:hover {
  background: rgba(56, 189, 248, 0.3);
}

.btn-large {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 2px;
}

.btn-subtext {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 500;
  font-family: var(--font-mono);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: var(--transition);
}

/* Hero Strip */
.hero-strip {
  padding: 38px 36px 24px;
  max-width: 1320px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-pill);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #38bdf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 800px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-desc strong {
  color: #f1f5f9;
}

/* Main Container Grid */
.main-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 28px;
  position: relative;
  z-index: 10;
}

/* Panels */
.card-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.card-header {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Form Sections */
.form-section {
  margin-bottom: 22px;
}

.section-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Target Grid Cards */
.target-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.choice-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.choice-card.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.choice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.choice-info {
  display: flex;
  flex-direction: column;
}

.choice-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.choice-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Bortle Pills */
.bortle-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pill-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.pill-btn.active {
  background: rgba(168, 85, 247, 0.15);
  border-color: var(--accent-purple);
  color: #e9d5ff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.2);
}

/* Window Chips */
.window-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chip-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.chip-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.chip-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #bae6fd;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

/* Action Footer */
.action-footer {
  margin: 22px 0 20px;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* Dark Adaptation Timer Card */
.dark-timer-card {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.timer-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.pupil-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-rose);
  margin-top: 4px;
  box-shadow: 0 0 10px var(--accent-rose);
}

.timer-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.timer-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.timer-display-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

#adaptCountdown {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  flex: 1;
}

/* Tab Header */
.tab-header {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

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

.tab-btn.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.tab-content {
  display: none;
}

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

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

/* Sky Banner */
.sky-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(168, 85, 247, 0.06) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 22px;
}

.sky-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sky-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.bortle-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.model-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sky-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.sky-summary {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Targets List */
.targets-section {
  margin-bottom: 22px;
}

.targets-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.targets-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.targets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.target-item {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.target-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.target-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--accent-cyan);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.target-content h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.target-content p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.target-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Etiquette Card */
.etiquette-card {
  display: flex;
  gap: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 18px;
}

.etiquette-icon {
  font-size: 2rem;
  line-height: 1;
}

.etiquette-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #a7f3d0;
  margin-bottom: 4px;
}

.etiquette-body {
  font-size: 0.88rem;
  color: #d1fae5;
  line-height: 1.55;
}

/* Star Chart Container */
.chart-header {
  margin-bottom: 16px;
}

.chart-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.chart-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.star-chart-container {
  background: #04060e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.star-svg {
  width: 100%;
  height: 280px;
  display: block;
}

.star-pulse {
  animation: starTwinkle 3s infinite ease-in-out;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.chart-legend {
  display: flex;
  justify-content: space-around;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Stargazing Log & Meteor Counter */
.journal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.journal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.journal-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.streak-badge {
  text-align: right;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.streak-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
  display: block;
  line-height: 1;
}

.streak-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.meteor-counter-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.counter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.counter-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.counter-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.counter-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.meteor-count {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-rose);
  min-width: 60px;
  text-align: center;
}

.log-form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}

.log-form-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.log-form-card textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  resize: vertical;
  margin-bottom: 12px;
  outline: none;
  transition: var(--transition);
}

.log-form-card textarea:focus {
  border-color: var(--accent-emerald);
}

.journal-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.journal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.journal-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.journal-body {
  font-size: 0.92rem;
  color: #e5e7eb;
  line-height: 1.55;
  margin-bottom: 8px;
}

.journal-tags {
  display: flex;
  gap: 8px;
}

.j-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-card {
  background: #0f1629;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.btn-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-cyan);
}

.form-help {
  display: block;
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.test-connection-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.test-feedback {
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.test-feedback.ok {
  color: #34d399;
}

.test-feedback.err {
  color: #f87171;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  .navbar {
    padding: 14px 20px;
  }
  .hero-strip {
    padding: 24px 20px 18px;
  }
  .main-container {
    padding: 0 20px;
  }
}
