/*
 * Bulk Domain Checker - Global Theme System
 * Light theme by default, with dark mode toggle
 */

:root {
  /* Light theme (default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-nav: rgba(255, 255, 255, 0.95);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent: #059669;
  --accent-hover: #047857;
  --accent-light: #d1fae5;
  --accent-glow: rgba(5, 150, 105, 0.2);

  --success: #22c55e;
  --success-bg: #dcfce7;
  --error: #ef4444;
  --error-bg: #fee2e2;

  --border: #e2e8f0;
  --border-hover: #cbd5e1;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  --grid-opacity: 0.03;
  --glow-opacity: 0.08;
}

[data-theme="dark"] {
  /* Dark theme */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1e293b;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-nav: rgba(10, 15, 26, 0.95);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #06d6a0;
  --accent-hover: #05c795;
  --accent-light: rgba(6, 214, 160, 0.15);
  --accent-glow: rgba(6, 214, 160, 0.3);

  --success: #06d6a0;
  --success-bg: rgba(6, 214, 160, 0.15);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.15);

  --border: #1e293b;
  --border-hover: #334155;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

  --grid-opacity: 0.03;
  --glow-opacity: 0.15;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.theme-toggle:hover svg {
  color: var(--accent);
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Background effects */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(5, 150, 105, var(--grid-opacity)) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 150, 105, var(--grid-opacity)) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--glow-opacity);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -200px;
  right: -100px;
  background: var(--accent);
}

.bg-glow-2 {
  bottom: 20%;
  left: -200px;
  background: #3b82f6;
  opacity: calc(var(--glow-opacity) * 0.7);
}

/* Card styles */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow), var(--shadow-lg);
}

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:visited {
  color: #ffffff !important;
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Status badges */
.badge-available {
  background: var(--success-bg);
  color: var(--success);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-taken {
  background: var(--error-bg);
  color: var(--error);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Form elements */
input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
