:root {
  --bg-color: #1a2332;
  /* Deep Navy Blue */
  --surface-color: #2d3e50;
  /* Lighter Navy */
  --surface-hover: #34495e;
  --primary-color: #ff5722;
  /* Fire Orange (unchanged) */
  --primary-glow: rgba(255, 87, 34, 0.4);
  --accent-color: #5dade2;
  /* Sky Blue */
  --text-primary: #ecf0f1;
  /* Off-white/Light tint */
  --text-secondary: #95a5a6;
  /* Muted Gray-Blue */
  --border-color: #34495e;
  --nav-height: 60px;
}

/* Gradient Text (Dark to Light) */
h1,
h2,
.nav-brand,
.text-gradient,
#greeting-text {
  background: linear-gradient(to right, #d84315, #ffb74d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at center, var(--bg-color) 0%, #0a0f1a 100%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Navigation */
nav {
  height: var(--nav-height);
  background-color: rgba(26, 35, 50, 0.6);
  /* Semi-transparent Navy */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
  text-decoration: none;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Layout */
.main-container {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
  padding: 2rem;
}

/* Firepit Layout (Golden Ratio) */
.firepit-layout {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  /* Golden Ratio approx */
  height: calc(100vh - var(--nav-height));
  position: relative;
  overflow: hidden;
}

.content-panel {
  padding: 2rem;
  z-index: 10;
  background: linear-gradient(90deg, var(--bg-color) 0%, rgba(26, 47, 26, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.firepit-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 61.8%;
  /* Golden Ratio width */
  height: 100%;
  z-index: 1;
}

/* Liquid Glass Theme */
.glass-panel,
.glass-card,
.card {
  background: rgba(45, 62, 80, 0.2);
  /* Navy with transparency */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* More subtle border */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.firepit-ui {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 20;
  /* Glass effect is now handled by glass-panel class if applied, or we override here */
  background: rgba(26, 35, 50, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1.5rem;
  border-radius: 24px;
  /* More rounded for Apple feel */
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 400px;
}

.firepit-ui h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.ui-group {
  margin-bottom: 1rem;
}

.ui-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--text-primary);
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Components */
.card {
  /* background-color: var(--surface-color); Removed for glass effect */
  border-radius: 16px;
  /* box-shadow: 0 4px 6px rgba(0,0,0,0.3); Replaced by glass shadow */
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-color: var(--primary-color);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
  background-color: #ff7043;
  box-shadow: 0 0 25px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

/* Search Bar */
.search-bar {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0.8rem 1.5rem;
  width: 100%;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.search-bar:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Utilities */
.text-gradient {
  background: linear-gradient(45deg, #ff5722, #ff9100);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.no-padding {
  margin-top: var(--nav-height);
  padding: 0;
  min-height: calc(100vh - var(--nav-height));
}

mark {
  background: rgba(255, 87, 34, 0.2);
  color: #ffab91;
  padding: 0 2px;
  border-radius: 2px;
}

/* Job List */
.job-list {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 1rem;
}

.job-list::-webkit-scrollbar {
  width: 6px;
}

.job-list::-webkit-scrollbar-track {
  background: var(--bg-color);
}

.job-list::-webkit-scrollbar-thumb {
  background: var(--surface-color);
  border-radius: 3px;
}

.job-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

  /* Navigation */
  .nav-links {
    display: none;
  }

  #menuToggle {
    display: block !important;
    color: var(--text-primary);
    border-color: var(--text-secondary);
  }

  #mobileMenu {
    background: rgba(26, 35, 50, 0.98) !important;
    /* Darker navy for better contrast */
  }

  #mobileMenu a {
    color: var(--text-secondary) !important;
    font-size: 1.1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  #mobileMenu a:hover,
  #mobileMenu a.active {
    color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 0.05);
  }

  #mobileMenu.open {
    display: flex !important;
  }

  /* Layout */
  .firepit-layout {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    height: auto !important;
    min-height: calc(100vh - var(--nav-height));
    overflow-y: auto !important;
    padding-bottom: 4rem;
    /* Space for quote */
  }

  /* Firepit Canvas */
  #firepit-canvas {
    position: absolute !important;
    /* Keep absolute to sit behind/top */
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    /* Takes top half */
    z-index: 1;
    pointer-events: none !important;
    /* Allow scrolling through canvas */
    touch-action: none !important;
  }

  /* Welcome Message */
  .welcome-overlay {
    position: relative;
    margin-top: 10vh;
    /* Push down slightly */
    width: 100%;
    transform: none !important;
    padding: 0 1rem;
    margin-bottom: 2rem;
    z-index: 10;
  }

  .welcome-overlay h1 {
    font-size: 2.5rem;
  }

  .welcome-overlay p {
    font-size: 1rem;
  }

  /* HUD Layer */
  #hud-layer {
    opacity: 1 !important;
    /* Always visible on mobile */
    position: relative;
    pointer-events: auto;
    padding: 1rem;
    background: linear-gradient(180deg, transparent 0%, var(--bg-color) 20%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* HUD Panels (Stacked List) */
  #hud-layer .glass-panel {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 0 !important;
    /* Reset margins, use gap */
    text-align: center !important;
    /* Center text for mobile */
    display: block;
  }

  /* Specific adjustments for panels */
  #hud-layer .glass-panel>div {
    justify-content: center !important;
    /* Center flex items */
  }

  /* Audio Toggle on Mobile */
  #audio-toggle {
    display: flex !important;
    /* Unhide */
    border-radius: 16px !important;
    /* Make it look like a panel button */
    width: 100% !important;
    height: auto !important;
    padding: 1rem !important;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem !important;
  }

  /* Hide only HUD toggle */
  #hud-toggle {
    display: none !important;
  }

  /* Quote on Mobile */
  #quote-container {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 100% !important;
    padding: 0 1rem;
  }
}