/* ============ RESET & BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --accent: #7c3aed;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --bg-dark: #0f172a;
  --bg-dark-2: #1e293b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.2), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--bg-dark);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
  color: #e2e8f0;
  min-height: 100vh;
  line-height: 1.65;
}

a {
  color: #93c5fd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #bfdbfe;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ============ HEADER ============ */
.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

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

.logo h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 400;
  margin-top: 0.1rem;
}

/* ============ HERO CARD ============ */
.hero-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xl);
}

.hero-content h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.hero-content > p {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-content > p a {
  color: #93c5fd;
  font-weight: 600;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.feature {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: all 0.2s ease;
}

.feature:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.feature strong {
  color: #f1f5f9;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.2rem;
}

.feature p {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* How it works */
.how-it-works {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
}

.how-it-works h3 {
  color: #f1f5f9;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.steps-explanation {
  display: flex;
  gap: 1rem;
}

.step-explain {
  flex: 1;
  text-align: center;
  padding: 1rem 0.75rem;
}

.step-explain-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.step-explain strong {
  color: #f1f5f9;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.3rem;
}

.step-explain p {
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ============ STEPS INDICATOR ============ */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.step span {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  transition: color 0.3s ease;
}

.step.active .step-number {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.step.active span {
  color: #e2e8f0;
  font-weight: 600;
}

.step.completed .step-number {
  background: var(--success);
  color: #fff;
  border-color: var(--success-light);
}

.step.completed span {
  color: var(--success);
}

.step-line {
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.5rem;
  margin-bottom: 1.2rem;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.step-line.active {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ============ CARDS ============ */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  color: var(--gray-900);
}

.card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
  font-weight: 700;
}

.description {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.description code {
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--gray-700);
}

/* ============ STEP SECTIONS ============ */
.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

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

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--gray-700);
  font-size: 0.92rem;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.2s ease;
  background: #fff;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-prefix {
  padding: 0 0.85rem;
  font-size: 1.1rem;
  background: var(--gray-50);
  height: 50px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--gray-200);
}

input[type="text"],
input[type="email"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
}

input::placeholder {
  color: var(--gray-400);
}

.hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--gray-500);
  font-size: 0.82rem;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  border: 1px solid #bfdbfe;
}

.info-note span {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-note p {
  font-size: 0.88rem;
  color: #1e40af;
  line-height: 1.5;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--gray-50);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

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

.btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-group .btn-secondary {
  width: auto;
  flex-shrink: 0;
}

.btn-group .btn-primary {
  flex: 1;
}

.btn-new {
  margin-top: 2rem;
}

.btn-copy {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  opacity: 0.4;
  transition: all 0.2s;
  color: var(--gray-600);
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.btn-copy:hover {
  opacity: 1;
  background: var(--gray-100);
}

/* ============ SPINNER ============ */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ DNS INFO ============ */
.dns-info {
  margin: 1.5rem 0;
}

.dns-record {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
}

.dns-field {
  margin-bottom: 1.15rem;
}

.dns-field:last-child {
  margin-bottom: 0;
}

.dns-field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.4rem;
  display: block;
}

.dns-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dns-value code {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  color: var(--gray-900);
  word-break: break-all;
  flex: 1;
}

.hint-inline {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.badge {
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-blue {
  background: var(--primary);
  color: #fff;
}

/* ============ ALERT BOXES ============ */
.warning-box {
  background: var(--warning-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.warning-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.warning-box strong {
  color: #92400e;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.92rem;
}

.warning-box ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #78350f;
}

.warning-box li {
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
}

.warning-box a {
  color: var(--primary-dark);
  font-weight: 600;
}

.success-box {
  background: var(--success-light);
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.success-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.success-box strong {
  color: #14532d;
  font-size: 1.05rem;
}

.success-box p {
  color: #166534;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ============ SECTION TITLE ============ */
.section-title {
  font-size: 1.05rem;
  color: var(--gray-800);
  margin-bottom: 1rem;
  font-weight: 700;
}

/* ============ DOWNLOAD GRID ============ */
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.download-card {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.download-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.download-card .file-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.download-card .file-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.download-card .file-desc {
  font-size: 0.76rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ============ INSTALL GUIDE ============ */
.install-guide {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 0.5rem;
}

.install-details {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: #fff;
  overflow: hidden;
}

.install-details:last-of-type {
  margin-bottom: 0;
}

.install-details summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  color: var(--gray-800);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
  list-style: none;
}

.install-details summary::-webkit-details-marker {
  display: none;
}

.install-details summary::after {
  content: '▸';
  margin-left: auto;
  transition: transform 0.2s;
  color: var(--gray-400);
}

.install-details[open] summary::after {
  transform: rotate(90deg);
}

.install-details summary:hover {
  background: var(--gray-50);
}

.server-icon {
  font-size: 0.85rem;
}

.install-content {
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--gray-100);
}

.install-content p {
  color: var(--gray-600);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.install-content ol {
  padding-left: 1.25rem;
  color: var(--gray-600);
  font-size: 0.88rem;
}

.install-content ol li {
  margin-bottom: 0.3rem;
}

.install-content pre {
  background: var(--bg-dark);
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.install-content code {
  font-size: 0.82rem;
}

/* ============ FAQ ============ */
.faq-section {
  margin-top: 2.5rem;
  padding: 0 0.5rem;
}

.faq-section h2 {
  color: #f1f5f9;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.faq-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  overflow: hidden;
  transition: all 0.2s;
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.15);
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: '+';
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 0.75rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::before {
  content: '−';
}

.faq-item summary:hover {
  background: rgba(255,255,255,0.03);
}

.faq-item p {
  padding: 0 1.25rem 1rem 2.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item a {
  color: #93c5fd;
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--gray-800);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.success {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

.toast.error {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ============ FOOTER ============ */
.footer {
  margin-top: 3rem;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-powered p {
  color: #64748b;
  font-size: 0.88rem;
}

.footer-powered a {
  color: #93c5fd;
  font-weight: 600;
}

.footer-validity {
  font-size: 0.8rem !important;
  color: #475569 !important;
  margin-top: 0.2rem;
}

.footer-divider {
  width: 50px;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.footer-author p {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-author a {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.footer-author a:hover {
  text-decoration: none;
  filter: brightness(1.2);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .container {
    padding: 1rem 0.75rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  .hero-card {
    padding: 1.75rem 1.25rem;
  }

  .logo h1 {
    font-size: 1.6rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-explanation {
    flex-direction: column;
    gap: 0.5rem;
  }

  .step-explain {
    display: flex;
    text-align: left;
    gap: 1rem;
    padding: 0.75rem 0;
  }

  .step-explain-number {
    margin: 0;
    flex-shrink: 0;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn-secondary {
    width: 100%;
  }

  .step-line {
    width: 30px;
  }

  .hero-content h2 {
    font-size: 1.25rem;
  }
}

/* ============================================================
   SELECTOR DE HERRAMIENTAS (HUB)
   ============================================================ */
.tool-selector-section {
  margin-bottom: 2rem;
}

.tool-selector-intro {
  text-align: center;
  margin-bottom: 1.75rem;
}

.tool-selector-intro h2 {
  font-size: 1.5rem;
  color: #f1f5f9;
  margin-bottom: 0.4rem;
}

.tool-selector-intro p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.tool-card-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ============ TOOL APPS (contenedores por herramienta) ============ */
.tool-app {
  display: none;
}

.tool-app.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

.btn-tool-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  font-family: inherit;
}

.btn-tool-back:hover {
  text-decoration: underline;
}

/* ============ SELECT INPUT ============ */
.select-input {
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ============ TOOL RESULTS ============ */
.tool-results {
  margin-top: 1.75rem;
}

.result-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  word-break: break-all;
}

.result-empty,
.result-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  color: var(--gray-600);
  padding: 2rem 1rem;
}

.result-error {
  color: var(--danger);
  background: var(--danger-light);
  border-color: #fecaca;
}

.result-empty-icon {
  font-size: 2rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.result-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}

.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-value {
  font-size: 0.9rem;
  color: var(--gray-900);
  word-break: break-word;
}

.result-tags-block {
  margin-top: 1rem;
}

.result-subtitle {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.result-muted {
  color: var(--gray-500);
  font-size: 0.88rem;
}

.result-source {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--gray-400);
  word-break: break-all;
}

.badge-gray {
  background: var(--gray-200);
  color: var(--gray-700);
}

/* ============ DNS RESULT TABLES (nslookup) ============ */
.dns-result-group {
  margin-bottom: 1.5rem;
}

.dns-result-group:last-child {
  margin-bottom: 0;
}

.dns-result-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.dns-result-count {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.85rem;
}

.result-table th {
  text-align: left;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.6rem 0.85rem;
}

.result-table td {
  padding: 0.6rem 0.85rem;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-900);
}

.result-value-cell {
  word-break: break-all;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82rem;
}

/* ============ EMAIL DOSSIER: RISK METER + AUTH CARDS ============ */
.risk-meter {
  position: relative;
  height: 34px;
  border-radius: 20px;
  background: var(--gray-200);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.risk-meter-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.4s ease;
}

.risk-low .risk-meter-fill { background: linear-gradient(90deg, #16a34a, #22c55e); }
.risk-medium .risk-meter-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.risk-high .risk-meter-fill { background: linear-gradient(90deg, #dc2626, #ef4444); }

.risk-meter-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-900);
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.auth-card {
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--gray-200);
  background: #fff;
}

.auth-card.auth-found {
  border-color: #bbf7d0;
  background: var(--success-light);
}

.auth-card.auth-missing {
  border-color: #fde68a;
  background: var(--warning-light);
}

.auth-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--gray-800);
}

.auth-card-value {
  font-size: 0.78rem;
  color: var(--gray-700);
  word-break: break-all;
  font-family: 'SFMono-Regular', Consolas, monospace;
  line-height: 1.5;
}

/* ============ RESPONSIVE: TOOLS ============ */
@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SPEED TEST: TIMING BREAKDOWN BARS
   ============================================================ */
.timing-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.timing-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 70px;
  align-items: center;
  gap: 0.75rem;
}

.timing-bar-label {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 600;
}

.timing-bar-track {
  height: 10px;
  background: var(--gray-100);
  border-radius: 6px;
  overflow: hidden;
}

.timing-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.timing-bar-value {
  font-size: 0.78rem;
  color: var(--gray-700);
  text-align: right;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

@media (max-width: 640px) {
  .timing-bar-row {
    grid-template-columns: 80px 1fr 60px;
    gap: 0.5rem;
  }
}

/* ============================================================
   TEXTAREA / ENCODING TOOLS
   ============================================================ */
.textarea-input {
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: var(--gray-900);
  background: #fff;
  resize: vertical;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.textarea-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.encoding-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.encoding-tab {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.encoding-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.encoding-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

