/* styles.css modernizado */
:root {
  --primary: #0074D9;
  --primary-hover: #005fa3;
  --background: #f0f2f5;
  --surface: #ffffff;
  --outline: #dcdfe6;
  --text: #1f2d3d;
  --muted: #6c757d;
  --border-radius: 20px;
}

body.dark {
  --primary: #66b2ff;
  --primary-hover: #3399ff;
  --background: #121212;
  --surface: #1e1e1e;
  --outline: #3a3a3a;
  --text: #f5f5f5;
  --muted: #b0b0b0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 960px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

h1 {
  margin: 0;
  color: var(--primary);
  font-size: 2.25rem;
  font-weight: 600;
}

.env-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  color: white;
  width: fit-content;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.env-badge.dev {
  background-color: #00b06d;
}

.env-badge.prd {
  background-color: #e53935;
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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


label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  resize: vertical;
  min-height: 100px;
  background-color: var(--surface);
  color: var(--text);
  font-size: 15px;
}

textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 116, 217, 0.2);
}

button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 15px;
  cursor: pointer;
  /* transition: background-color 0.2s ease; */
  /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  transition: all 0.2s ease;
}

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

button.copy {
  margin-top: 12px;
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

button.copy:hover {
  background-color: var(--primary);
  color: white;
}

button:active {
  transform: scale(0.97);
}

pre {
  background-color: var(--surface);
  border: 1px solid var(--outline);
  padding: 16px;
  border-radius: 10px;
  white-space: pre-wrap;
  font-size: 14px;
  overflow-x: auto;
  color: var(--text);
}

.section {
  padding: 16px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  border-left: 4px solid var(--outline);
}

.section.success {
  border-color: var(--primary);
}

.section.error {
  border-color: #d93025;
}

hr {
  border: none;
  border-top: 1px solid var(--outline);
  margin: 24px 0;
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.dns-record {
  background-color: var(--background);
  border: 1px solid var(--outline);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.dns-record > div {
  word-break: break-word;
}

.spinner {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
}

.spinner div {
  width: 16px;
  height: 16px;
  margin: 4px;
  background-color: white;
  border-radius: 100%;
  animation: spinner-bounce 1.4s infinite ease-in-out both;
}

.spinner div:nth-child(1) {
  animation-delay: -0.32s;
}

.spinner div:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes spinner-bounce {
  0%, 80%, 100% {
    transform: scale(0);
  } 
  40% {
    transform: scale(1);
  }
}

.toggle-theme {
  position: absolute;
  top: 20px;
  right: 20px;
}

.toggle-theme input {
  height: 0;
  width: 0;
  visibility: hidden;
}

.toggle-theme label {
  cursor: pointer;
  width: 55px;
  height: 26px;
  background: var(--outline);
  display: block;
  border-radius: 100px;
  position: relative;
  transition: background-color 0.3s ease;
}

.toggle-theme label:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border-radius: 90px;
  transition: 0.3s;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.toggle-theme input:checked + label {
  background: var(--primary);
}

.toggle-theme input:checked + label:after {
  left: calc(100% - 3px);
  transform: translateX(-100%);
}

.toggle-theme label:active:after {
  width: 26px;
}

.output-block {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
