/* ===== CSS Reset & Variable Tokens ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Mode Palette (Default) */
  --bg-primary: #080710;
  --bg-secondary: #0f0e1a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(139, 92, 246, 0.4);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.25);
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 72px;
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-primary: #f5f6fa;
  --bg-secondary: #eef1f6;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-active: rgba(139, 92, 246, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  --accent-glow: rgba(139, 92, 246, 0.12);
}

/* ===== Global Settings ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Ambient Decorative Orbs ===== */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  animation: orbMovement 25s ease-in-out infinite alternate;
}

[data-theme="light"] .orb {
  opacity: 0.06;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: var(--accent-primary);
  top: -150px;
  right: -100px;
}

.orb-2 {
  width: 450px;
  height: 450px;
  background: var(--accent-secondary);
  bottom: -100px;
  left: -100px;
  animation-delay: -5s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: #3b82f6;
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes orbMovement {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -60px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.9); }
}

/* ===== Glass Card Utility ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* ===== Header ===== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(8, 7, 16, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}

@media (max-width: 768px) {
  .main-header {
    height: var(--header-height);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .hero-section {
    padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 12px);
  }
}

[data-theme="light"] .main-header {
  background: rgba(245, 246, 250, 0.8);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.logo-orb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 10px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* ===== Hero Section ===== */
.hero-section {
  padding-top: calc(var(--header-height) + 12px);
  padding-bottom: 8px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  color: var(--accent-light);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  border: 1px solid var(--border-subtle);
}

.hero-title, .section-title, h1, h2 {
  font-family: var(--font-display);
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 4px;
}

.hero-desc, .section-subtitle {
  font-size: 0.88rem !important;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.45;
  white-space: normal;
  max-width: 680px;
  margin: 0 auto;
}

/* ===== Tool Switcher Bar ===== */
.tool-switcher-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 650px;
  margin: 16px auto 0;
  padding: 4px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  position: sticky;
  top: calc(var(--header-height) + 4px);
  z-index: 99;
  box-sizing: border-box;
}

.switcher-pill {
  width: 100%;
  padding: 8px 6px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switcher-pill:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.switcher-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.content-section {
  padding-top: 64px;
  padding-bottom: 64px;
  position: relative;
  z-index: 1;
}

#comparison {
  padding-top: 8px;
  padding-bottom: 40px;
}

#comparison .section-header {
  margin-top: 4px;
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

/* ===== Interactive Grid ===== */
.interactive-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 32px;
  align-items: start;
}

/* Config Panel */
.config-panel {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Search & Customise Banner ===== */
.search-customise-banner {
  padding: 28px 32px;
  margin-bottom: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.banner-top-row {
  margin-bottom: 20px;
}

.banner-title-area .panel-title {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.panel-subtitle-sm {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.search-bar-row {
  margin-bottom: 20px;
}

/* Extension Pills (TLD Chips) */
.tld-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.tld-chips-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tld-chips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.tld-chips-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tld-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tld-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-light);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tld-chip.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.chip-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 99px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge-avail {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.badge-taken {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.tld-chip.active .badge-avail {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tld-chip.active .badge-taken {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tld-chip.is-available {
  border-color: rgba(16, 185, 129, 0.25);
}

.tld-chip.is-taken {
  border-color: rgba(239, 68, 68, 0.15);
  opacity: 0.85;
}

.customise-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-subtle);
}

@media (max-width: 768px) {
  .customise-controls-grid {
    grid-template-columns: 1fr;
  }
}

.highlight-val {
  color: var(--accent-primary);
  font-weight: 700;
}

.status-notice-text {
  font-size: 0.86rem;
  margin-top: 4px;
}

.status-notice-text.taken {
  color: var(--danger);
  font-weight: 600;
}

.status-notice-text.available {
  color: var(--success);
  font-weight: 600;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Custom Select */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▼";
  font-size: 0.7rem;
  color: var(--text-secondary);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

#tld-select, #chart-tld-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: all var(--transition-fast);
}

#tld-select:focus, #chart-tld-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Search Input styling */
.search-input-wrap {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.search-input-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#domain-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  outline: none;
}

.search-go-btn {
  padding: 0 24px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
  min-width: 90px;
}

.search-go-btn:hover {
  opacity: 0.9;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Availability panel */
.availability-status-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  animation: slideIn 0.3s ease;
}

.availability-status-panel.hidden {
  display: none !important;
}

.availability-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.status-indicator-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-indicator-badge.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.status-indicator-badge.taken {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.status-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-domain {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-all;
}

.status-notice-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

.status-notice-text.taken {
  color: #ef4444;
}

.status-notice-text.available {
  color: #10b981;
}

/* Alternatives */
.alternative-suggestions {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 18px;
}

.alt-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.alt-card {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.alt-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.alt-card.available {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.alt-card.available:hover {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.12);
}

.alt-ext {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-primary);
  display: block;
}

.alt-status {
  font-size: 0.72rem;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

.alt-status.available {
  color: var(--success);
}

.alt-status.taken {
  color: var(--text-muted);
}

/* Slider */
.period-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

#slider-val-label {
  color: var(--accent-light);
  font-family: var(--font-mono);
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  outline: none;
  appearance: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-chk {
  width: 20px;
  height: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.checkbox-label:hover input ~ .custom-chk {
  border-color: var(--accent-primary);
}

.checkbox-label input:checked ~ .custom-chk {
  background: var(--accent-gradient);
  border-color: transparent;
}

.custom-chk::after {
  content: "";
  display: none;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-label input:checked ~ .custom-chk::after {
  display: block;
}

/* Saving insight */
.saving-insight-badge {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* ===== Comparison Results ===== */
.comparison-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sort-by-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-by-wrap span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sort-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sort-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.sort-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: transparent;
}

/* Registrar cards */
.registrars-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.registrar-card {
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.registrar-card.best-value {
  border-color: var(--accent-secondary);
}

.best-value-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 16px;
  border-bottom-left-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.reg-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.reg-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warning);
}

.price-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.price-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-value.special {
  color: var(--success);
}

.price-period {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.price-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.breakdown-item.renewal {
  color: var(--danger);
  font-weight: 500;
}

.action-box {
  display: flex;
  justify-content: flex-end;
}

.action-btn {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px var(--accent-glow);
  text-align: center;
  text-decoration: none;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.action-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: none;
}

.action-btn.secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* ===== Feature Matrix Table ===== */
.matrix-table-wrap {
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.matrix-table th, .matrix-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
}

.matrix-table td {
  color: var(--text-secondary);
}

.matrix-table tr:hover td {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
}

.matrix-table .name-col {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-weight: 600;
}

.badge-no {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--danger);
  font-weight: 600;
}

.badge-warning {
  color: var(--warning);
  font-weight: 600;
}

.pros-cons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.pro-item { color: var(--success); }
.con-item { color: var(--danger); }

/* ===== Smart Finder Quiz ===== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quiz-stage {
  display: none;
  width: 100%;
}

.quiz-stage.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-progress {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  transition: width var(--transition-normal);
}

.quiz-illustration {
  font-size: 4rem;
}

.q-num {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-light);
  letter-spacing: 1px;
}

.q-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.quiz-option {
  padding: 16px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.quiz-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateX(4px);
}

.recommended-card {
  padding: 32px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  margin: 20px 0;
  text-align: left;
  width: 100%;
}

.rec-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

.rec-reason {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Multi-Year Cost Planner ===== */
.calc-box-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}

.chart-controls {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.year-selector-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.year-btn {
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.year-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.year-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.calc-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.color-1 { background-color: var(--accent-primary); }
.legend-dot.color-2 { background-color: var(--accent-secondary); }

.chart-card {
  padding: 32px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.chart-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.chart-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card-hover);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.canvas-container {
  position: relative;
  height: 320px;
  width: 100%;
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-info {
  max-width: 500px;
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
  .interactive-grid, .calc-box-grid {
    grid-template-columns: 1fr;
  }
  
  .config-panel, .chart-controls {
    position: static;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  /* Interactive Pill Switcher on mobile: horizontal swipeable pill carousel */
  .tool-switcher-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-full);
    width: 100%;
    max-width: 100%;
    margin: 12px 0 8px;
  }

  .tool-switcher-bar::-webkit-scrollbar {
    display: none;
  }

  .switcher-pill {
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-full) !important;
    white-space: nowrap !important;
  }

  /* Command Center adjustments */
  .search-customise-banner {
    padding: 18px 14px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
  }

  .banner-title-area .panel-title {
    font-size: 1.22rem;
  }

  .panel-subtitle-sm {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .search-input-wrap {
    border-radius: var(--radius-sm);
  }

  #domain-search-input {
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .search-go-btn {
    padding: 0 18px;
    min-width: 75px;
    font-size: 0.85rem;
  }

  .tld-chips-wrapper {
    padding: 12px 10px;
  }

  .tld-chips-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 10px;
  }

  .tld-chips-hint {
    font-size: 0.72rem;
  }

  .tld-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tld-chip {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .customise-controls-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Results Toolbar & Sorting */
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
  }

  .results-heading {
    text-align: left;
  }

  .results-title {
    font-size: 1.15rem;
    font-weight: 700;
  }

  .sort-by-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sort-by-wrap span {
    font-size: 0.78rem;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 600;
  }

  .sort-btn {
    flex: 1;
    min-width: fit-content;
    text-align: center;
    padding: 7px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  /* Registrar Cards: Modern Mobile Card Layout */
  .registrar-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px;
    text-align: left;
    border-radius: var(--radius-md);
  }

  .registrar-card.best-value {
    border-color: var(--accent-secondary);
  }

  .best-value-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-bottom-left-radius: var(--radius-sm);
  }

  .reg-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-right: 75px;
    text-align: left;
  }

  .reg-name {
    font-size: 1.15rem;
    font-weight: 800;
    text-align: left;
  }

  .reg-score {
    font-size: 0.78rem;
    text-align: left;
  }

  .price-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    text-align: left;
  }

  [data-theme="light"] .price-box {
    background: rgba(0, 0, 0, 0.02);
  }

  .price-label {
    font-size: 0.7rem;
    text-align: left;
  }

  .price-value {
    font-size: 1.35rem;
    line-height: 1.2;
    text-align: left;
  }

  .price-period {
    font-size: 0.75rem;
    text-align: left;
  }

  .price-breakdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
  }

  [data-theme="light"] .price-breakdown {
    background: rgba(0, 0, 0, 0.02);
  }

  .breakdown-item {
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .action-box {
    width: 100%;
    margin-top: 4px;
  }

  .action-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Matrix Table Mobile Cards */
  .matrix-table-wrap {
    overflow-x: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
  }

  .matrix-table, 
  .matrix-table tbody, 
  .matrix-table tr, 
  .matrix-table td {
    display: block;
    width: 100%;
  }

  .matrix-table thead {
    display: none;
  }

  .matrix-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .matrix-table td {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    font-size: 0.82rem;
    gap: 8px;
  }

  .matrix-table td:last-child {
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    padding-top: 10px;
  }

  .matrix-table td.name-col {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-active);
    padding-bottom: 8px;
    margin-bottom: 6px;
    text-align: left;
    display: block;
  }

  .matrix-table td:nth-child(2)::before { content: "WHOIS Privacy"; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; flex-shrink: 0; }
  .matrix-table td:nth-child(3)::before { content: "DNSSEC"; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; flex-shrink: 0; }
  .matrix-table td:nth-child(4)::before { content: "2FA Support"; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; flex-shrink: 0; }
  .matrix-table td:nth-child(5)::before { content: "Renewal Hike"; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; flex-shrink: 0; }
  .matrix-table td:nth-child(6)::before { content: "Support Quality"; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; flex-shrink: 0; }
  .matrix-table td:nth-child(7)::before { content: "Pros & Cons"; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; margin-bottom: 4px; }

  /* Quiz on mobile */
  .quiz-container {
    padding: 20px 14px;
    min-height: auto;
  }

  .q-title {
    font-size: 1.15rem;
    margin-bottom: 4px;
  }

  .quiz-option {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

  /* Multi-Year Chart on mobile */
  .calc-box-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .chart-controls,
  .chart-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .year-selector-btns {
    gap: 6px;
  }

  .year-btn {
    padding: 10px 6px;
    font-size: 0.8rem;
  }

  .canvas-container {
    height: 280px;
  }
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  color: var(--accent-light);
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* Mobile Navigation Dropdown Drawer */
.mobile-nav-dropdown {
  display: none;
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 6px);
  right: 14px;
  left: 14px;
  background: rgba(18, 18, 26, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  opacity: 1 !important;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 10px;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  z-index: 99999;
}

[data-theme="light"] .mobile-nav-dropdown {
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.mobile-nav-dropdown.active {
  display: flex !important;
  animation: slideIn 0.2s ease;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

[data-theme="light"] .mobile-nav-link {
  color: #334155;
  background: transparent;
}

[data-theme="light"] .mobile-nav-link:hover,
[data-theme="light"] .mobile-nav-link.active {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}
