/* Styles for dns-service.html */
#setup .container {
  text-align: center;
}

.page-hero {
  padding-top: 180px;
  padding-bottom: 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-hero {
    padding-top: 140px;
    padding-bottom: 80px;
  }
}

.page-hero h1 {
  font-size: clamp(3rem, 9vw, 5rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .page-hero .container {
    padding: 0 8px;
  }
}

.dns-address-box {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 25px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 1.2rem;
}

@media (max-width: 600px) {
  .dns-address-box {
    flex-direction: column;
    gap: 10px;
    padding: 15px 20px;
    font-size: 1rem;
  }
}

.dns-address-box code {
  font-family: monospace;
  font-weight: 600;
  color: var(--accent-2);
  font-size: 1.3rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

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

.benefit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--bg-offset);
  padding: 30px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  text-align: center;
}

.benefit-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-1);
  box-shadow: 0 0 35px rgba(82, 74, 242, 0.2);
}

.benefit-card .icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  color: var(--accent-1);
}

.benefit-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.benefit-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Tabs scroll system */
.tabs-scroll-wrapper {
  position: relative;
  margin-bottom: 40px;
}

.tabs-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  justify-content: center;
}

.platform-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .tabs-scroll-wrapper {
    margin-bottom: 30px;
  }

  .tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 36px;
    /* leave space for arrows */
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tabs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-offset);
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 20;
    opacity: 0.95;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }

  .tabs-arrow[hidden] {
    display: none;
  }

  .tabs-arrow:active {
    transform: translateY(-50%) scale(0.97);
  }

  .tabs-arrow--left {
    left: 0;
  }

  .tabs-arrow--right {
    right: 0;
  }
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 20px;
  cursor: pointer;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.platform-icon {
  display: block;
  width: 1.18em;
  height: 1.18em;
  flex: 0 0 auto;
  fill: currentColor;
}

.tab-button .platform-icon {
  font-size: 1em;
}

.tab-button:hover {
  color: var(--text-primary);
}

.tab-button.active {
  color: var(--accent-2);
}

@media (max-width: 768px) {
  .tab-button {
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

.tab-underline {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  background-color: var(--accent-2);
  transition:
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.tabs-content-wrapper {
  position: relative;
  min-height: 320px;
  margin-bottom: 40px;
  transition: height 0.3s ease;
}

@media (max-width: 768px) {
  .tabs-content-wrapper {
    min-height: 400px;
    margin-bottom: 60px;
  }
}

.tab-content {
  opacity: 0;
  position: absolute;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease,
    visibility 0s 0.4s;
}

.tab-content.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.tab-content.slide-from-right {
  transform: translateX(30px);
}

.tab-content.slide-from-left {
  transform: translateX(-30px);
}

.instructions-panel {
  background-color: var(--bg-offset);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 30px 40px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .instructions-panel {
    padding: 20px 25px;
  }
}

.instructions-panel p {
  margin-bottom: 20px;
}

.instructions-panel ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.instructions-panel strong {
  color: var(--text-primary);
}

.instructions-panel code {
  font-family: monospace;
  background-color: var(--surface);
  color: var(--accent-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.instructions-panel a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.instructions-panel a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.os-detection-note {
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-secondary);
}

.detected-platform {
  display: inline;
  color: var(--text-primary);
  line-height: inherit;
}

.platform-icon--inline {
  display: inline-block;
  width: 1.12em;
  height: 1.12em;
  margin-right: 0.35em;
  vertical-align: -0.16em;
}

.main-footer {
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border-color);
}

/* --- DNS Modal System --- */
.dns-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0s 0.3s;
}

.dns-modal-overlay:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.3s ease,
    visibility 0s;
}

.dns-modal {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.dns-modal-overlay:not([hidden]) .dns-modal {
  transform: scale(1);
  opacity: 1;
}

/* Step Transitions */
.dns-step {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  width: 100%;
}

.dns-step.fade-out {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}

.dns-step.fade-in {
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
}

.dns-step:not(.fade-out):not(.fade-in) {
  opacity: 1;
  transform: translateX(0);
}

.dns-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s;
}

.dns-modal-close:hover {
  color: var(--text-primary);
}

.dns-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.dns-modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 25px;
}

.dns-modal-text a {
  color: var(--accent-2);
  text-decoration: none;
}

.dns-modal-text a:hover {
  text-decoration: underline;
}

.dns-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.dns-checkbox-wrapper:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text-secondary);
}

/* Hide native checkbox */
.dns-checkbox-wrapper input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.dns-checkbox-wrapper input[type='checkbox']:focus-visible + .dns-custom-checkbox {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-ring-shadow);
}

/* Custom Checkbox Container */
.dns-custom-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--text-secondary);
  border-radius: 6px;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  pointer-events: none;
}

/* Checked State - Box */
.dns-checkbox-wrapper input[type='checkbox']:checked + .dns-custom-checkbox {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

/* Checkmark Icon inside */
.dns-custom-checkbox svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Checked State - Icon */
.dns-checkbox-wrapper input[type='checkbox']:checked + .dns-custom-checkbox svg {
  opacity: 1;
  transform: scale(1) translateY(1px);
}

.dns-checkbox-label {
  font-size: 0.95rem;
  color: var(--text-primary);
  user-select: none;
}

/* Info View Styles */
.dns-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 25px;

  /* Shrinking behavior */
  min-width: 0;
  max-width: 100%;
}

.dns-location-tag svg {
  flex-shrink: 0;
}

.dns-location-tag .location-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dns-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  vertical-align: middle;
  cursor: pointer;
}

.dns-status-tag:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dns-status-tag.status-up {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.dns-status-tag.status-down {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  position: relative;
}

.dns-status-tag.status-up .status-dot::after,
.dns-status-tag.status-down .status-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  transform: translate3d(-50%, -50%, 0) scale(1) rotateZ(0.01deg);
  animation: ripple 1.5s ease-out infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  z-index: -1;
}

.dns-status-tag.status-up .status-dot,
.dns-status-tag.status-down .status-dot {
  opacity: 1;
  z-index: 1;
}

@keyframes ripple {
  0% {
    transform: translate3d(-50%, -50%, 0) scale(1) rotateZ(0.01deg);
    opacity: 0.8;
  }

  100% {
    transform: translate3d(-50%, -50%, 0) scale(3) rotateZ(0.01deg);
    opacity: 0;
  }
}

.dns-info-group {
  margin-bottom: 20px;
}

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

/* DNS Server Blocks */
.dns-server-block {
  padding: 0;
}

.dns-server-block--unavailable {
  isolation: isolate;
}

.dns-server-unavailable-surface {
  position: relative;
  overflow: visible;
}

.dns-server-unavailable-content {
  filter: blur(12px) saturate(0.42) brightness(0.9);
  opacity: 0.38;
  pointer-events: none;
  transform: scale(1.01);
  transform-origin: center;
  user-select: none;
}

.dns-server-unavailable-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  z-index: 2;
}

.dns-server-unavailable-title {
  color: #f4efff;
  font-size: clamp(1.95rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.dns-server-unavailable-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.dns-server-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.dns-server-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

.dns-info-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.dns-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-offset);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 8px;
}

.dns-copy-row code {
  flex: 1;
  font-family: monospace;
  font-size: 1rem;
  color: var(--accent-2);
  word-break: break-all;
}

.dns-copy-row:hover {
  border-color: var(--accent-2);
}

/* --- Compatibility Checker --- */
.checker-container {
  max-width: 800px;
  margin: 0 auto;
}

.dns-search-filter {
  margin-bottom: 35px;
}

/* Service List */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.service-category-group {
  margin-bottom: 40px;
}

.service-category-header {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.service-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.service-name {
  font-weight: 500;
  color: var(--text-primary);
}

.service-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #4ade80;
  /* Green */
  background: rgba(22, 163, 74, 0.2);
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.service-status--patched {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.no-results {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.no-results strong {
  word-break: break-all;
  color: var(--text-primary);
}

/* Raw Lists */
.raw-lists-container {
  margin-top: 60px;
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.raw-lists-container h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 500;
}

.raw-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.raw-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.raw-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.raw-btn svg {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .service-cards-container {
    grid-template-columns: 1fr;
  }

  .search-wrapper input {
    font-size: 1rem;
    padding: 14px 18px 14px 44px;
  }
}

/* --- DNS retirement / migration page --- */
.dns-migration-hero .container {
  max-width: 980px;
}

.dns-migration-hero {
  padding-top: 155px;
  padding-bottom: 90px;
}

.dns-migration-hero h1 {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(2.75rem, 6.5vw, 4.2rem);
  line-height: 1.2;
}

.dns-migration-hero .container > p:not(.dns-kicker) {
  max-width: 780px;
  margin-bottom: 2rem;
}

.dns-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 0.85rem;
  padding: 6px 12px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.08);
  color: #d8b4fe;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dns-guide-panel .dns-kicker,
.provider-placeholder-card .dns-kicker,
.source-card .dns-kicker {
  margin-right: 0;
  margin-left: 0;
}

.page-hero .dns-kicker,
.dns-guide-panel .dns-kicker,
.provider-placeholder-card .dns-kicker,
.source-card .dns-kicker {
  color: #d8b4fe;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.page-hero .dns-kicker {
  margin-bottom: 0.85rem;
}

.dns-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-button--secondary {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cta-button--secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(168, 85, 247, 0.38);
}

.dns-retirement-notice {
  max-width: 860px;
  margin: 0 auto 70px;
}

.dns-retirement-notice a {
  color: #fdba74;
  font-weight: 700;
  text-decoration: none;
}

.dns-retirement-notice a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.migration-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.migration-card {
  position: relative;
  isolation: isolate;
  min-height: 360px;
  padding: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  color: var(--text-primary);
  text-align: left;
  text-decoration: none;
  background:
    radial-gradient(circle at 22% 0%, rgba(168, 85, 247, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(22, 21, 46, 0.78), rgba(10, 9, 26, 0.96));
  border: 1px solid var(--border-color);
  border-radius: 22px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.migration-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(82, 74, 242, 0.18), transparent 42%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.migration-card:hover,
.migration-card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(168, 85, 247, 0.42);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.32),
    0 0 44px rgba(168, 85, 247, 0.16);
}

.migration-card:hover::before,
.migration-card:focus-visible::before {
  opacity: 1;
}

.migration-card:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.migration-card--recommended {
  border-color: rgba(82, 74, 242, 0.38);
  background:
    radial-gradient(circle at 20% 0%, rgba(82, 74, 242, 0.26), transparent 38%),
    linear-gradient(145deg, rgba(22, 21, 46, 0.9), rgba(10, 9, 26, 0.96));
}

.migration-card__badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(82, 74, 242, 0.22);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.migration-card__icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 18px;
  color: var(--accent-2);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.08);
}

.migration-card--recommended .migration-card__icon {
  color: #c7d2fe;
  border-color: rgba(82, 74, 242, 0.3);
  background: rgba(82, 74, 242, 0.12);
}

.migration-card__label {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.migration-card--recommended .migration-card__label {
  color: #c7d2fe;
}

.migration-card h3 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  line-height: 1.18;
}

.migration-card p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.migration-card__footer {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 800;
}

.migration-card__arrow {
  transition: transform 0.2s ease;
}

.migration-card:hover .migration-card__arrow,
.migration-card:focus-visible .migration-card__arrow {
  transform: translateX(4px);
}

.dns-guide-grid,
.provider-placeholder-grid,
.source-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.dns-guide-panel,
.provider-placeholder-card,
.source-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 32px;
  text-align: left;
  background: rgba(22, 21, 46, 0.62);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dns-guide-panel--primary {
  background:
    radial-gradient(circle at 10% 0%, rgba(82, 74, 242, 0.22), transparent 40%),
    rgba(22, 21, 46, 0.7);
  border-color: rgba(82, 74, 242, 0.28);
}

.dns-guide-panel--center {
  max-width: 760px;
  margin: 0 auto;
  align-items: center;
  text-align: center;
}

.dns-guide-panel--center .cta-button {
  align-self: center;
}

.dns-guide-panel h2,
.dns-guide-panel h3,
.provider-placeholder-card h3,
.source-card h3 {
  line-height: 1.2;
}

.dns-guide-panel h3,
.provider-placeholder-card h3,
.source-card h3 {
  font-size: clamp(1.45rem, 3vw, 1.8rem);
}

.dns-guide-panel p,
.provider-placeholder-card p,
.source-card p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.dns-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

.dns-checklist li {
  position: relative;
  padding-left: 36px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.dns-checklist li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(168, 85, 247, 0.38);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent-2) 0 32%, transparent 36%), rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.12);
}

.dns-checklist strong {
  color: var(--text-primary);
}

.provider-placeholder-card {
  border-style: dashed;
}

.provider-placeholder-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.provider-placeholder-card__status--ready {
  color: #c7f9d4;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.provider-placeholder-card__empty-state {
  width: 100%;
  margin-top: auto;
  padding: 22px;
  border: 1px dashed rgba(168, 85, 247, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.08) 25%, transparent 25%) 0 0 / 18px 18px,
    rgba(255, 255, 255, 0.025);
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
}

.nextdns-importer-card {
  border-style: solid;
  border-color: rgba(82, 74, 242, 0.28);
  background:
    radial-gradient(circle at 95% 8%, rgba(82, 74, 242, 0.2), transparent 34%),
    rgba(22, 21, 46, 0.66);
}

.nextdns-importer {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  margin-top: auto;
}

.nextdns-importer__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nextdns-importer__field label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 800;
}

.nextdns-importer__field input,
.nextdns-importer__field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--text-primary);
  background: rgba(8, 8, 20, 0.76);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.nextdns-importer__field input:focus,
.nextdns-importer__field select:focus {
  border-color: rgba(168, 85, 247, 0.66);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
  background: rgba(8, 8, 20, 0.9);
}

.nextdns-importer__field select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.nextdns-importer__field p {
  margin: 0;
  color: var(--text-muted, var(--text-secondary));
  font-size: 0.9rem;
  line-height: 1.5;
}

.nextdns-profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 2px;
}

.nextdns-profile-loading[hidden] {
  display: none;
}

.nextdns-profile-loading .loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(82, 74, 242, 0.2);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: importer-spin 1s linear infinite;
  margin: 0 auto 2px;
}

.nextdns-profile-loading .dns-modal-text {
  margin-bottom: 0;
  text-align: center;
}

.nextdns-profile-error-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.nextdns-profile-error-actions[hidden] {
  display: none;
}

.nextdns-importer__field a {
  color: var(--accent-2);
  font-weight: 700;
}

.nextdns-importer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nextdns-importer__load,
.nextdns-importer__submit {
  cursor: pointer;
}

.nextdns-importer__submit {
  justify-content: center;
  width: 100%;
  border: 0;
}

.nextdns-importer__load[disabled],
.nextdns-importer__submit[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.nextdns-importer__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nextdns-importer__meta span,
.nextdns-importer__status {
  padding: 12px 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.nextdns-importer__status.is-success {
  color: #c7f9d4;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.24);
}

.nextdns-importer__status.is-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.28);
}

.nextdns-importer__status.is-error[hidden] {
  display: none;
}

.nextdns-importer__progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 999px;
}

.nextdns-importer__progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.06);
}

.nextdns-importer__progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 999px;
}

.nextdns-importer__progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 999px;
}

.source-card code {
  display: block;
  width: 100%;
  margin: 4px 0 8px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  color: var(--accent-2);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-family: monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.source-card .raw-btn {
  margin-top: auto;
}

@media (max-width: 900px) {
  .migration-card-grid,
  .dns-guide-grid,
  .provider-placeholder-grid,
  .source-card-grid {
    grid-template-columns: 1fr;
  }

  .migration-card {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .dns-migration-hero {
    padding-top: 130px;
    padding-bottom: 70px;
  }

  .dns-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dns-hero-actions .cta-button {
    width: 100%;
    align-self: stretch;
  }

  .migration-card,
  .dns-guide-panel,
  .provider-placeholder-card,
  .source-card {
    padding: 24px;
    border-radius: 16px;
  }

  .migration-card__badge {
    position: static;
    order: -1;
    margin-bottom: 4px;
  }

  .nextdns-importer__meta {
    grid-template-columns: 1fr;
  }
}

/* --- Loading Skeleton --- */
.skeleton-group {
  margin-bottom: 40px;
}

.skeleton-header {
  height: 20px;
  width: 220px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.skeleton-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.skeleton-name {
  height: 16px;
  width: 55%;
  border-radius: 4px;
}

.skeleton-status {
  height: 28px;
  width: 80px;
  border-radius: 6px;
}

.skeleton-pulse {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* --- Staggered Card Entrance --- */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-enter {
  animation: cardEnter 0.2s ease both;
}

/* --- Category Count Badge --- */
.category-count {
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: 0.9em;
  margin-left: 4px;
}

/* --- Fuzzy Note --- */
.fuzzy-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 10px 16px;
  margin-bottom: 25px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
}

/* --- Retry Button --- */
.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.retry-btn[hidden] {
  display: none;
}

.retry-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Base search-wrapper and chips logic shared between pages */
.search-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-wrapper input.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-color);
  padding: 16px 20px 16px 50px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.search-wrapper input.search-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px rgba(82, 74, 242, 0.15);
  background: rgba(22, 21, 46, 0.8);
}

.search-wrapper .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-wrapper input.search-input:focus ~ .search-icon {
  color: var(--accent-1);
}

.category-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.category-chips-wrapper:empty {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.category-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.category-chip.active {
  background: rgba(82, 74, 242, 0.2);
  border-color: var(--accent-1);
  color: #fff;
}

@media (max-width: 768px) {
  .search-wrapper input.search-input {
    font-size: 1rem;
    padding: 14px 18px 14px 44px;
  }
}

/* --- Importer Specific Modal Styles --- */
.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.modal-actions-row .cta-button {
  width: auto;
}

.modal-actions-row .next-step-btn {
  margin-top: 0;
}

@media (max-width: 520px) {
  .modal-actions-row {
    justify-content: stretch;
  }

  .modal-actions-row .cta-button {
    width: 100%;
  }
}

.import-loading-view,
.import-success-view {
  text-align: center;
  padding: 30px 10px 10px;
}

.import-loading-view .loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(82, 74, 242, 0.2);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: importer-spin 1s linear infinite;
  margin: 0 auto 25px;
}

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

.import-loading-view .stuck-message {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--accent-2);
  background: rgba(168, 85, 247, 0.1);
  padding: 10px 15px;
  border-radius: 8px;
  display: inline-block;
  animation: fade-in-up 0.4s ease;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.import-success-view .success-icon-wrapper {
  color: #4ade80;
  margin-bottom: 20px;
  animation: scale-in-bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scale-in-bounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10000;
}

/* Step 1 tweaks */
.api-key-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.api-key-input-wrapper input {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-right: 40px; /* space for icon */
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.api-key-input-wrapper input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.api-key-input-wrapper input.is-valid {
  border-color: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.api-key-validation-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
}

.api-key-validation-icon__icon {
  display: none;
  width: 1rem;
  height: 1rem;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.api-key-validation-icon.is-valid,
.api-key-validation-icon.is-invalid {
  opacity: 1;
}

.api-key-validation-icon.is-valid {
  color: #4ade80;
}

.api-key-validation-icon.is-invalid {
  color: #ef4444;
}

.api-key-validation-icon.is-valid .api-key-validation-icon__icon--valid,
.api-key-validation-icon.is-invalid .api-key-validation-icon__icon--invalid {
  display: block;
}

.api-key-help-text {
  margin-bottom: 25px;
}

.next-step-btn {
  margin-top: 8px;
}

/* Progress styles */
.import-progress-container {
  margin-top: 25px;
}

.nextdns-importer__progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  overflow: hidden;
  appearance: none;
  margin-bottom: 8px;
}

.nextdns-importer__progress::-webkit-progress-bar {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nextdns-importer__progress::-webkit-progress-value {
  background-color: var(--accent-1);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.nextdns-importer__progress::-moz-progress-bar {
  background-color: var(--accent-1);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.eta-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
