/* ==========================================================================
   jmandl - Design System & Custom Styles
   Aesthetic: Fusion of Google (minimalism & utility) + Apple (elegance & polish)
   ========================================================================== */

/* --- Font Smoothing & Base Variables --- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, monospace;

  /* Light Theme Palette */
  --bg-primary: #fbfbfd;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.72);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.06);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --shadow-subtle: 0 4px 24px -1px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 32px -4px rgba(0, 0, 0, 0.08);
}

.dark {
  /* Dark Theme Palette (Deep Apple Obsidian & Space Gray) */
  --bg-primary: #07090e;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(24, 32, 50, 0.9);
  --bg-glass: rgba(10, 14, 23, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);
  --text-primary: #f9fafb;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-glow: rgba(6, 182, 212, 0.2);
  --shadow-subtle: 0 4px 24px -1px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 40px -4px rgba(0, 0, 0, 0.6);
}

/* --- Base Body & Typography --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.font-mono {
  font-family: var(--font-mono);
}

/* --- Apple Frosted Glass / Glassmorphism --- */
.glass-nav {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 1px solid var(--border-glass);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.glass-dropdown {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.25);
}

/* --- Ambient Background Glow (Apple Style) --- */
.ambient-glow-mesh {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 480px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-circle-1 {
  position: absolute;
  top: -120px;
  left: 20%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 70%);
  filter: blur(60px);
}

.glow-circle-2 {
  position: absolute;
  top: -80px;
  right: 20%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(60px);
}

.dark .glow-circle-1 {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 70%);
}

.dark .glow-circle-2 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
}

/* --- Google-Inspired Search / Launcher Bar --- */
.search-launcher {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
}

.search-launcher:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
  transform: scale(1.01);
}

/* --- Keyboard Shortcut KBD Badges --- */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-secondary);
}

/* --- Modern Dropdown Transitions --- */
.dropdown-menu-wrapper {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu-wrapper.active,
.group:hover .dropdown-menu-wrapper {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* --- DNS Tool UI Custom Components --- */
.dns-record-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  text-align: center;
}

.badge-a { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-aaaa { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-cname { background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-mx { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-txt { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-ns { background: rgba(99, 102, 241, 0.15); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-soa { background: rgba(236, 72, 153, 0.15); color: #ec4899; border: 1px solid rgba(236, 72, 153, 0.3); }

/* --- DNS Record Row Styling --- */
.dns-result-row {
  border-bottom: 1px solid var(--border-card);
  transition: background-color 0.15s ease;
}

.dns-result-row:last-child {
  border-bottom: none;
}

.dns-result-row:hover {
  background: rgba(59, 130, 246, 0.04);
}

/* --- Pill Tabs Selector --- */
.pill-tab {
  transition: all 0.2s ease;
}

.pill-tab.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}
