:root {
  --primary-color: #64748b;
  --primary-hover: #475569;
  --primary-dark: #334155;
  --button-bg: #475569;
  --button-hover: #334155;
  --button-text: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #f8fafc;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --error-color: #dc2626;
  --success-color: #64748b;
  --link-color: #64748b;
  --link-hover: #475569;
  --link-visited: #94a3b8;
  --shadow-sm: 0 1px 2px 0 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);
}

[data-theme="dark"] {
  --primary-color: #94a3b8;
  --primary-hover: #cbd5e1;
  --primary-dark: #475569;
  --button-bg: #374151;
  --button-hover: #1f2937;
  --button-text: #f9fafb;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-light: #f1f5f9;
  --bg-primary: #0f172a;
  --bg-secondary: #020617;
  --border-color: #334155;
  --card-bg: #0f172a;
  --error-color: #ef4444;
  --success-color: #94a3b8;
  --link-color: #cbd5e1;
  --link-hover: #f1f5f9;
  --link-visited: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

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

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

/* Enhanced button styles */
.btn-enhanced {
  background: var(--primary-color);
  color: white;
  margin: 0.25rem;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.btn-enhanced:hover {
  background: var(--primary-hover);
}

/* Small copy button style */
.btn-copy {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}

.btn-copy:hover {
  background: var(--button-hover);
}


/* Hero section styles - consistent styling for tool descriptions */
.hero h1 {
  text-align: center;
  margin: 1.5rem 0;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* Container styles */
.tool-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2.5rem;
  max-width: 800px;
  width: 100%;
  margin: 2rem auto;
}

.section-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

/* Control group styles */
.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.control-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .control-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Flex utilities */
.flex-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flex-group-center {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  max-width: 350px;
  margin: 0 auto;
}

.flex-1 {
  flex: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

/* Size utilities */
.w-20 {
  width: 5rem;
}

.w-60 {
  width: 4rem;
}

.w-80 {
  width: 20rem;
}

.min-w-20 {
  min-width: 5rem;
}

.min-w-25 {
  min-width: 6.25rem;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}

.font-normal {
  font-weight: normal;
}

.error-message {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: var(--error-color);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success-color);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

/* Enhanced form field styles */
input[type="text"],
input[type="number"],
input[type="color"],
input[type="range"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-weight: 500;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="color"]:hover,
select:hover {
  border-color: var(--primary-color);
}

/* Enhanced textarea styles */
textarea {
  resize: vertical;
  min-height: 80px;
}

/* Color input specific styles */
input[type="color"] {
  height: 45px;
  width: 60px;
  cursor: pointer;
  padding: 0;
  border: 2px solid var(--border-color);
}

input[type="color"]:hover {
  border-color: var(--primary-color);
}

/* Range input styles */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  padding: 0;
  border: none;
  min-width: 120px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-hover);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

/* Number input spinner styles */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: auto;
  appearance: auto;
  opacity: 1;
}

/* Firefox number input styling - show arrows */
input[type="number"] {
  -moz-appearance: number-input;
}

/* Enhanced label styles */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.label-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

/* Link styles for better visibility in dark mode */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

a:visited {
  color: var(--link-visited);
}


@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-brand {
    font-size: 1.25rem;
  }

  .tool-container {
    padding: 1.5rem;
    margin: 1rem auto;
  }

  h1 {
    font-size: 2rem;
  }

  .flex-group-vertical {
    flex-direction: column;
    gap: 0.5rem;
  }
}
