/* ==========================================================================
   HOME.CSS - Standalone Stylesheet for HexCodePicker Homepage
   ========================================================================== */

/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
  --bg-base: #faf5ff;
  --bg-surface: #ffffff;
  --bg-elevated: #f4e8fd;
  --text-primary: #1e1b4b;
  --text-secondary: #6b21a8;
  --border-color: rgba(0, 0, 0, 0.15);
  --border-hover: rgba(141, 24, 231, 0.3);
  --accent: #8d18e7;
  --radius-lg: 24px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 10px 40px -10px rgba(141, 24, 231, 0.08);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Outfit", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
   background-color: var(--bg-base);
   
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    gap: 32px;
    font-weight: 300;
}

/* --- 2. NAVIGATION BAR --- */
.main-nav {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  padding: 16px 32px;
}

.nav-brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  justify-content: center;
}

.nav-right-spacer {
  flex: 1;
}

.nav-link {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
}

.nav-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 8px;
  z-index: 2000;
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 0;
  width: 100%;
  height: 24px;
}
.nav-dropdown-wrapper:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  padding: 12px 16px;
  text-decoration: none;
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  background: var(--bg-elevated);
  color: var(--accent);
  padding-left: 20px;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #0f172a;
  cursor: pointer;
  padding: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .nav-dropdown-wrapper:hover .dropdown-trigger svg {
    transform: rotate(180deg) !important;
  }
}
.nav-dropdown-wrapper.active .dropdown-trigger svg {
  transform: rotate(180deg) !important;
}

/* --- 3. LAYOUT CONTAINERS --- */
.app-container {
  width: 100%; /* ADDED: Forces full width on mobile */
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.85); /* Light frosted glass */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-soft),
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 0 0 1px var(--border-color);
  overflow: hidden;
}

.detail-section {
  padding: 40px 32px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.01);
}

.detail-section:first-child {
  border-top: none;
  background: transparent;
}

.section-header h2,
.table-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* --- 4. HERO SPLIT SECTION --- */
.hero-split-container {
  width: 100%;
  max-width: 1100px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
}

.hero-text-content {
  position: relative;
  z-index: 10;
}

.version-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}

.hero-text-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-text-content p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
  max-width: 500px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-pill.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(141, 24, 231, 0.25);
}
.btn-pill.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(141, 24, 231, 0.35);
  background: #7a12cc;
}
.btn-pill.secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-pill.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- FLOATING UI MOCKUPS --- */
.hero-visual-content {
  position: relative;
  height: 420px;
  width: 100%;
  z-index: 5;
}

.mockup-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  padding: 20px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

.mc-1 {
  top: 5%;
  left: 0;
  z-index: 3;
  width: 300px;
}
.mc-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.color-circles {
  display: flex;
  gap: 10px;
}
.cc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #fff;
}

.mc-2 {
  top: 40%;
  right: 0;
  z-index: 2;
  width: 260px;
  animation-delay: -2s;
}
.contrast-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.contrast-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: #15803d;
  line-height: 1;
}
.contrast-badge {
  background: #dcfce7;
  color: #166534;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.75rem;
}
.contrast-text {
  padding: 10px;
  background: var(--text-primary);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
}

.mc-3 {
  bottom: 0;
  left: 15%;
  z-index: 1;
  width: 320px;
  animation-delay: -4s;
}
.code-line {
  height: 10px;
  border-radius: 4px;
  background: var(--border-color);
  margin-bottom: 8px;
  width: 100%;
  opacity: 0.3;
}
.code-line.w-80 {
  width: 80%;
}
.code-line.w-60 {
  width: 60%;
}
.code-line.w-40 {
  width: 40%;
}
.code-line.purple {
  background: var(--accent);
  width: 30%;
  opacity: 1;
}

/* --- 5. TRUSTED LOGOS SECTION --- */
.trusted-section {
  text-align: center;
  padding: 0 24px 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 32px;
}
.trusted-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 600;
  opacity: 0.8;
}
.trusted-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 40px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
.trusted-logos:hover {
  opacity: 0.8;
}
.brand-svg {
  height: 24px;
  width: auto;
  fill: var(--text-primary);
}

/* --- 6. INLINE HOMEPAGE COLOR PICKER --- */
.metrics-bar {
  position: relative; /* Added so we can perfectly center the child */
  display: flex;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.01);
}
.swatch-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  padding: 6px 8px;
  border-radius: 100px;
  border: 1px solid var(--border-color);
}
.metrics-group {
    /* Absolute centering */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  /* Flex layout */
  display: flex;
  gap: 24px; /* Slightly tighter to ensure it fits well on smaller screens */
  flex-wrap: nowrap; /* FORCES it to stay on one line */
  width: max-content; /* Stops the browser from squishing the container */
  align-items: center;
}
.metric {
  display: flex;
  align-items: center;
  gap: 8px;
}
.metric span:first-child {
  font-size: 14px;
  font-weight: 500;
  text-transform: capitalize; /* Remove all-caps */
  letter-spacing: normal;
  color: var(--text-secondary);
}
.metric span:last-child {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  user-select: none;
}
.metric span:last-child:hover {
  opacity: 0.6;
}
.metric span:last-child:active {
  opacity: 1;
}

.active-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.inline-picker-layout {
  display: grid; 
  grid-template-columns: 320px 300px; /* Set right column to exactly 300px */
  justify-content: center; /* Centers the tool perfectly */
  gap: 32px; 
  padding: 32px;
}

.color-map {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid var(--border-color);
}
.map-overlay-white {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
  pointer-events: none;
}
.map-overlay-black {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
  pointer-events: none;
}
.map-pointer {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hue-slider-container {
  position: relative;
  width: 100%;
  height: 16px;
  margin-top: 24px;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid var(--border-color);
}
.hue-track {
  width: 100%;
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(
    to right,
    #f00,
    #ff0,
    #0f0,
    #0ff,
    #00f,
    #f0f,
    #f00
  );
}
.hue-pointer {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.large-preview {
  width: 300px;
  height: 100%;
  min-height: 380px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.1s;
}

.color-input-control {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  gap: 8px;
}
.input-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}
#color-input-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-primary);
  width: 100%;
  background: transparent;
}
.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s;
}
.copy-btn:hover {
  color: var(--text-primary);
}

.format-select-wrapper {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
.format-select-wrapper .custom-select-trigger {
  border: none;
  background: transparent;
  padding: 6px 10px;
  min-width: 80px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: var(--text-primary);
  font-weight: 600;
  outline: none;
}
.format-select-wrapper .custom-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 90px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s ease;
}
.format-select-wrapper .custom-options:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.format-select-wrapper .custom-option {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.format-select-wrapper .custom-option:hover {
  background: var(--bg-elevated);
}
.format-select-wrapper .custom-option.active {
  background: var(--bg-elevated);
  color: black;
  font-weight: 600;
}

.picker-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.action-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  border: none;
}
.action-btn.outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.action-btn.outline:hover {
  background: var(--bg-elevated);
}
.action-btn.filled {
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #ffffff;
  text-decoration: none;
}
.action-btn.filled:hover {
  background: #1e293b;
}

/* --- 7. CORE TOOLS & FEATURES GRIDS --- */
.home-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: var(--border-hover);
}
.tool-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.tool-card h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.tool-card p {
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.6;
}
.card-link {
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
}

.modern-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.modern-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px 28px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
.modern-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(141, 24, 231, 0.08);
  border-color: var(--border-hover);
}
.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  background: var(--bg-elevated);
  color: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modern-feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(3deg);
}
.modern-feature-card h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.modern-feature-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* --- 8. COMMON COLORS TABLE --- */
.table-section-title {
  font-size: 24px !important;
}
.color-table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.color-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.color-table th {
  background: #f3e4ff;
  padding: 24px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: #6b21a8;
  border-bottom: 2px solid #e2e8f0;
}
.color-table td {
  padding: 20px 32px;
  border-bottom: 1px solid #f1f5f9;
  color: #000000;
  font-size: 0.9rem;
  font-weight: 600;
  vertical-align: middle;
}
.color-table tr:last-child td {
  border-bottom: none;
}
.table-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

/* --- 10. MODAL & TOASTS --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: all 0.2s ease;
  padding: 16px;
}
.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}
.modal-container {
  background: var(--bg-surface);
  width: 800px;
  flex-direction: column;
  max-height: 90vh;
  display: flex;
  max-width: 95vw;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.hidden .modal-container {
  transform: translateY(20px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
}
.modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.modal-sidebar {
  width: 240px;
  border-right: 1px solid var(--border-color);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-base);
}
.sidebar-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}
.sidebar-item:hover {
  background: var(--border-color);
}
.sidebar-item.active {
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.sidebar-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.sidebar-item span {
  font-size: 11px;
  color: var(--text-secondary);
}
.modal-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.export-top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}
.export-tabs {
  display: flex;
  gap: 16px;
}
.export-tab {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.export-tab.active {
  color: var(--text-primary);
}
.prefix-input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  outline: none;
  width: 120px;
}
.export-preview-area {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.export-swatches {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: auto;
}
.export-swatch-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  min-height: 34px !important;
}
.export-swatch-row:first-child {
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}
.export-swatch-row:last-child {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}
.export-swatch-row:hover {
  opacity: 0.9;
}
.export-swatch-row svg {
  margin-left: 8px;
  opacity: 0.7;
}
.export-code-block {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.export-code-block pre {
  flex: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-primary);
  line-height: 2;
  overflow-y: auto;
}
/* --- Fix for Export Copy Button Height --- */
#copy-all-export-btn {
  flex: none; 
  padding: 10px; 
}

.toast-wrapper {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}
.toast-notification {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
  border-radius: 100px;
  padding: 10px 20px 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast-notification span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.toast-notification b {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}
.toast-icon {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-notification.fade-out {
  animation: fadeOutDown 0.3s forwards;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes fadeOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(20px); /* Pushes it down as it fades */
    opacity: 0;
  }
}

/* --- 11. RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
  .hero-split-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0;
  }
  .hex-anatomy-grid {
    grid-template-columns: 1fr; /* Stacks the visual cards on mobile */
  }
  .hero-text-content p {
    margin: 0 auto 32px auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-visual-content {
    margin-top: 40px;
    height: 350px;
    transform: scale(0.9);
  }

  .home-tool-grid,
  .modern-features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .color-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
  }
  .color-table th,
  .color-table td {
    padding: 16px 20px;
    white-space: nowrap;
  }

  .inline-picker-layout {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .large-preview { width: 100%; min-height: 200px; order: -1; }

  .metrics-bar {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: transparent;
    border-bottom: none;
  }
  .swatch-group {
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
  }
  .metrics-group {
    position: static;
    transform: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .metric {
    width: 100%;
    background: var(--bg-elevated);
    padding: 16px 20px;
    border-radius: 12px;
    justify-content: space-between;
  }
  .metric span:first-child {
    color: var(--accent);
    font-size: 14px;
  }
  .metric span:last-child {
    font-size: 15px;
  }

  .modal-body {
    flex-direction: column;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
  }
  .modal-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
  .sidebar-item {
    min-width: 140px;
    padding: 8px;
  }
  .sidebar-item span {
    display: none;
  }
  .export-preview-area {
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .export-swatches {
    flex: none;
    max-height: 35vh;
    overflow-y: auto;
  }
  .export-code-block {
    flex: none;
    max-height: 25vh;
    overflow-y: auto;
  }
  /* Center the toast wrapper on mobile */
  .toast-wrapper {
    right: auto; /* Overrides the right: 32px rule */
    left: 50%; /* Moves to the horizontal center */
    transform: translateX(-50%); /* Shifts it perfectly to the middle */
    bottom: 24px; /* Optional: Slightly lower on mobile for easier reach */
    align-items: center; /* Ensures the toasts stack centered if there are multiple */
    width: max-content; 
  }
}

@media (max-width: 500px) {
  .hero-text-content h1 {
    font-size: 2.8rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-pill {
    width: 100%;
    justify-content: center;
  }
  .hero-visual-content {
    display: none;
  }
  .section-header h2,
  .table-section-title {
    font-size: 1.5rem !important;
  }
}
@media (min-width: 769px) {
  .app-container {
    zoom: 0.95; /* Scales the entire tool down to 80% */

    /* Optional: Add a subtle transition if you want it to scale smoothly when resizing the window */
    transition: zoom 0.2s ease;
  }
  .modal-container {
    zoom: 0.85; /* Scales the entire tool down to 80% */

    /* Optional: Add a subtle transition if you want it to scale smoothly when resizing the window */
    transition: zoom 0.2s ease;
  }
}
/* --- SEO CONTENT SECTION --- */
.seo-content-section {
  width: 100%;
  padding: 40px 32px 80px 32px;
  display: flex;
  justify-content: center;
}

.seo-content-wrapper {
  max-width: 1000px; /* Constrained width for optimal reading experience */
  width: 100%;
  margin: 0 auto; /* Ensures absolute centering on large screens */
}

.seo-text-block h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a; /* Sharp dark navy instead of inherited purple */
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.seo-text-block h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a; /* Sharp dark navy */
  margin: 40px 0 16px 0;
  letter-spacing: -0.01em;
}

.seo-text-block p {
  font-size: 1.1rem;
  line-height: 2;
  color: #475569; /* Clean, highly readable slate gray */
  margin-bottom: 20px;
  font-weight: 400;
}

.seo-text-block strong {
  color: #0f172a;
  font-weight: 700;
}

.seo-text-block code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-elevated);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
  font-weight: 600;
}

/* Visual Hex Cards within the text */
.hex-anatomy-grid {
  display: grid;
  /* This automatically pushes the boxes to a new row when the screen is too small */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.hex-anatomy-box {
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}

.hex-anatomy-box:hover {
  transform: translateY(-4px);
}

.hex-anatomy-box .hex-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.hex-anatomy-box .hex-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}