/* ============================================================
   Client WHOIS — animated client area design
   ============================================================ */

.cw-wrap {
  --cw-violet: #7c3aed;
  --cw-indigo: #6366f1;
  --cw-cyan: #06b6d4;
  --cw-emerald: #10b981;
  --cw-amber: #f59e0b;
  --cw-rose: #f43f5e;
  --cw-ink: #0f172a;
  --cw-slate: #475569;
  --cw-line: rgba(15, 23, 42, .12);
  --cw-rad-grad: linear-gradient(135deg, #a855f7, #6366f1 40%, #06b6d4);
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px 42px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--cw-ink);
}

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */
.cw-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(34px, 6vw, 64px) clamp(20px, 5vw, 56px);
  color: #fff;
  background: linear-gradient(130deg, #151b36, #1e1b4b 45%, #0f172a 90%);
  background-size: 220% 220%;
  animation: cwGrad 14s ease-in-out infinite;
  box-shadow: 0 24px 60px -22px rgba(15, 23, 42, .55);
}

.cw-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}

.cw-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  will-change: transform;
}
.cw-blob-a {
  width: 340px; height: 340px;
  top: -140px; left: -110px;
  background: radial-gradient(circle at 30% 30%, #a855f7, transparent 70%);
  animation: cwFloat 11s ease-in-out infinite;
}
.cw-blob-b {
  width: 300px; height: 300px;
  top: -60px; right: -90px;
  background: radial-gradient(circle at 60% 40%, #06b6d4, transparent 70%);
  animation: cwFloat 13s ease-in-out infinite reverse;
}
.cw-blob-c {
  width: 240px; height: 240px;
  bottom: -120px; left: 40%;
  background: radial-gradient(circle at 50% 50%, #6366f1, transparent 70%);
  animation: cwFloat 15s ease-in-out infinite;
}

.cw-hero-inner { position: relative; z-index: 1; text-align: center; }

.cw-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .4px;
  margin-bottom: 20px;
  animation: cwFadeUp .7s ease both;
}

.cw-pulse-dot {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #34d399;
  flex: none;
}
.cw-pulse-dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #34d399;
  animation: cwPing 1.6s ease-out infinite;
}

.cw-badge-sep {
  width: 1px; height: 14px;
  background: rgba(255,255,255,.3);
}
.cw-badge-sub { font-weight: 400; opacity: .8; }

.cw-title {
  margin: 0 0 10px;
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.5px;
  background: linear-gradient(120deg, #fff 20%, #c7d2fe 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cwFadeUp .7s ease .08s both;
}

.cw-subtitle {
  margin: 0 auto 30px;
  max-width: 620px;
  color: rgba(255,255,255,.78);
  font-size: 15.5px;
  line-height: 1.65;
  animation: cwFadeUp .7s ease .16s both;
}

/* ------------------------------------------------------------
   SEARCH CARD
   ------------------------------------------------------------ */
.cw-search-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.97);
  color: var(--cw-ink);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.14);
  animation: cwPop .7s cubic-bezier(.2,.9,.3,1.2) .24s both;
  overflow: hidden;
}

.cw-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.cw-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.cw-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  pointer-events: none;
  transition: color .25s ease;
}

.cw-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 2px solid var(--cw-line);
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--cw-ink);
  background: #fff;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}

.cw-input:focus {
  border-color: var(--cw-indigo);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .18);
}

.cw-input-wrap:focus-within .cw-input-icon { color: var(--cw-indigo); }

.cw-input-error {
  border-color: var(--cw-rose) !important;
  animation: cwShake .5s ease;
}

.cw-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(120deg, #7c3aed, #6366f1 50%, #2563eb);
  background-size: 200% 200%;
  box-shadow: 0 14px 30px -12px rgba(99, 102, 241, .7);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .25s ease, background-position .35s ease;
}
.cw-btn:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 18px 36px -12px rgba(99, 102, 241, .85);
}
.cw-btn:active { transform: translateY(0); }
.cw-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -70%;
  width: 50%; height: 100%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: cwShimmer 3.2s ease infinite;
}

.cw-btn-loader {
  display: none;
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cwSpin .8s linear infinite;
}

.cw-form.cw-is-busy .cw-btn-label { display: none; }
.cw-form.cw-is-busy .cw-btn-loader { display: block; }
.cw-form.cw-is-busy .cw-btn { pointer-events: none; opacity: .9; }

.cw-hint-line {
  margin-top: 13px;
  font-size: 12.5px;
  color: var(--cw-slate);
  text-align: center;
}
.cw-hint-line code {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, .1);
  color: var(--cw-indigo);
  font-size: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.cw-chips {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px dashed var(--cw-line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cw-chips-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cw-slate);
  white-space: nowrap;
}

.cw-chips-list { display: flex; flex-wrap: wrap; gap: 8px; }

.cw-chip {
  border: 1px solid rgba(99, 102, 241, .35);
  background: rgba(99, 102, 241, .06);
  color: var(--cw-indigo);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, box-shadow .25s ease;
}
.cw-chip:hover {
  transform: translateY(-2px) scale(1.05);
  background: var(--cw-indigo);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(99, 102, 241, .8);
}

/* ------------------------------------------------------------
   LOADING TERMINAL
   ------------------------------------------------------------ */
.cw-loading {
  margin-top: 22px;
  animation: cwFadeUp .45s ease both;
}

.cw-terminal {
  border-radius: 18px;
  overflow: hidden;
  background: #0b1120;
  border: 1px solid rgba(99, 102, 241, .35);
  box-shadow: 0 26px 60px -26px rgba(15, 23, 42, .7);
}

.cw-term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: #131a2e;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.cw-term-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex: none;
}
.cw-term-dot-r { background: #f87171; }
.cw-term-dot-y { background: #fbbf24; }
.cw-term-dot-g { background: #34d399; }

.cw-term-title {
  margin-left: 8px;
  font-size: 12.5px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  color: #6e7ba6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-term-body {
  position: relative;
  padding: 20px 22px 24px;
  min-height: 170px;
  font-size: 13.5px;
  line-height: 1.9;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  color: #a5b4fc;
}

.cw-term-scan {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  animation: cwScan 1.6s linear infinite;
}

.cw-term-line { margin: 0 0 8px; animation: cwFadeUp .4s ease both; }
.cw-term-line:nth-child(2) { animation-delay: .12s; }
.cw-term-line:nth-child(3) { animation-delay: .26s; }
.cw-term-line:nth-child(4) { animation-delay: .42s; }

.cw-term-prompt { color: #34d399; font-weight: 700; }
.cw-term-hl { color: #67e8f9; }

.cw-term-dots { display: inline-flex; gap: 4px; margin-left: 4px; }
.cw-term-dots i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #a5b4fc;
  animation: cwDots 1.2s ease-in-out infinite;
}
.cw-term-dots i:nth-child(2) { animation-delay: .15s; }
.cw-term-dots i:nth-child(3) { animation-delay: .3s; }

/* ------------------------------------------------------------
   ALERT / ERROR
   ------------------------------------------------------------ */
.cw-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 14px;
}

.cw-alert-error {
  background: rgba(244, 63, 94, .07);
  border: 1px solid rgba(244, 63, 94, .3);
  color: #9f1239;
}

.cw-alert-ic { display: flex; flex: none; color: #e11d48; }

.cw-alert-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cw-alert-title { font-weight: 700; }
.cw-alert-msg { color: var(--cw-slate); font-size: 13.5px; }

.cw-alert-retry {
  flex: none;
  border: 1px solid rgba(244, 63, 94, .4);
  background: #fff;
  color: #e11d48;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .18s ease;
}
.cw-alert-retry:hover { background: #e11d48; color: #fff; transform: translateY(-1px); }

.cw-alert-shake2 { animation: cwShake .55s ease; }

/* ------------------------------------------------------------
   RESULT
   ------------------------------------------------------------ */
.cw-result {
  margin-top: 24px;
}

.cw-result-in .cw-avail,
.cw-result-in .cw-result-id,
.cw-result-in .cw-copy-btn,
.cw-result-in .cw-cell,
.cw-result-in .cw-output-card {
  animation: cwFadeUp .6s ease both;
}

.cw-result-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(99,102,241,.09), rgba(6,182,212,.09));
  border: 1px solid rgba(99, 102, 241, .22);
}

.cw-avail {
  width: 54px; height: 54px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(16, 185, 129, .8);
  animation: cwPop .55s cubic-bezier(.2,.9,.3,1.25) .1s both;
}

.cw-result-id { flex: 1; min-width: 0; }

.cw-result-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--cw-slate);
}

.cw-result-domain {
  margin: 2px 0 0;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--cw-ink);
  word-break: break-all;
}
.cw-tld { color: var(--cw-indigo); }

.cw-copy-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--cw-line);
  background: #fff;
  color: var(--cw-slate);
  border-radius: 12px;
  padding: 9px 15px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .18s ease, color .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.cw-copy-btn:hover {
  transform: translateY(-2px);
  color: var(--cw-indigo);
  border-color: var(--cw-indigo);
  box-shadow: 0 10px 22px -12px rgba(99, 102, 241, .7);
}

/* ---- summary grid ---- */
.cw-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.cw-cell {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--cw-line);
  box-shadow: 0 8px 26px -18px rgba(15, 23, 42, .35);
  overflow: hidden;
  opacity: 0;
}
.cw-cell.cw-revealed { opacity: 1; animation: cwFadeUp .6s ease both; }

.cw-cell::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.cw-cell-violet::before { background: #8b5cf6; }
.cw-cell-cyan::before { background: #06b6d4; }
.cw-cell-emerald::before { background: #10b981; }
.cw-cell-amber::before { background: #f59e0b; }
.cw-cell-rose::before { background: #f43f5e; }
.cw-cell-indigo::before { background: #6366f1; }

.cw-cell-ic {
  display: flex;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 10px;
  background: rgba(99, 102, 241, .1);
  color: var(--cw-indigo);
  transition: transform .25s ease;
}
.cw-cell-violet .cw-cell-ic { background: rgba(139,92,246,.12); color: #7c3aed; }
.cw-cell-cyan .cw-cell-ic { background: rgba(6,182,212,.12); color: #0891b2; }
.cw-cell-emerald .cw-cell-ic { background: rgba(16,185,129,.12); color: #059669; }
.cw-cell-amber .cw-cell-ic { background: rgba(245,158,11,.14); color: #d97706; }
.cw-cell-rose .cw-cell-ic { background: rgba(244,63,94,.12); color: #e11d48; }
.cw-cell-indigo .cw-cell-ic { background: rgba(99,102,241,.12); color: #4f46e5; }

.cw-cell:hover .cw-cell-ic { transform: scale(1.12) rotate(-4deg); }

.cw-cell-lb {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--cw-slate);
}

.cw-cell-val {
  margin-top: 3px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cw-ink);
  word-break: break-word;
  line-height: 1.45;
}

/* ---- full output terminal ---- */
.cw-output-card {
  margin-top: 18px;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1120;
  border: 1px solid rgba(99, 102, 241, .3);
  box-shadow: 0 26px 60px -28px rgba(15, 23, 42, .75);
}

.cw-output-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: #131a2e;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.cw-output-title {
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #b6c2e4;
  flex: 1;
}

.cw-output-count {
  font-size: 12px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  color: #34d399;
  background: rgba(52, 211, 153, .12);
  padding: 3px 10px;
  border-radius: 999px;
}

.cw-pre {
  margin: 0;
  padding: 20px 22px;
  max-height: 560px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.65;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  transition: box-shadow .3s ease;
}
.cw-pre:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(99, 102, 241, .5); }

.cw-k { color: #67e8f9; font-weight: 600; }
.cw-u { color: #8b9ff0; text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------
   FEATURES
   ------------------------------------------------------------ */
.cw-features {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cw-feature {
  padding: 24px 22px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--cw-line);
  box-shadow: 0 14px 34px -24px rgba(15, 23, 42, .4);
  opacity: 0;
  transform: translateY(24px);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cw-feature:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, .4);
  box-shadow: 0 24px 48px -24px rgba(99, 102, 241, .45);
}

.cw-feature.cw-revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.3,1.1), box-shadow .3s ease, border-color .3s ease;
}

.cw-feature-ic {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 14px;
  transition: transform .3s ease;
}
.cw-feature:hover .cw-feature-ic { transform: scale(1.12) rotate(-5deg); }
.cw-feature-ic-violet { background: rgba(139,92,246,.12); color: #7c3aed; }
.cw-feature-ic-cyan { background: rgba(6,182,212,.12); color: #0891b2; }
.cw-feature-ic-emerald { background: rgba(16,185,129,.12); color: #059669; }

.cw-feature-title {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--cw-ink);
}

.cw-feature-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cw-slate);
}

/* ------------------------------------------------------------
   FALLBACK (sem JS)
   ------------------------------------------------------------ */
.cw-nojs { margin-top: 24px; }
.cw-nojs .cw-pre { color: #cbd5e1; }
.cw-nojs .cw-result-head,
.cw-nojs .cw-output-card { animation: cwFadeUp .6s ease both; }

/* ------------------------------------------------------------
   KEYFRAMES
   ------------------------------------------------------------ */
@keyframes cwGrad {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes cwFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(26px, -22px) scale(1.08); }
  66% { transform: translate(-18px, 18px) scale(.95); }
}

@keyframes cwPing {
  0% { transform: scale(1); opacity: .75; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

@keyframes cwPop {
  from { opacity: 0; transform: translateY(26px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

@keyframes cwShimmer {
  0% { left: -70%; }
  55% { left: 120%; }
  100% { left: 120%; }
}

@keyframes cwDots {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes cwScan {
  0% { top: 0; }
  100% { top: 100%; }
}

@keyframes cwShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-8px); }
  30%, 60%, 90% { transform: translateX(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .cw-hero, .cw-blob, .cw-pulse-dot::after,
  .cw-btn, .cw-btn::after, .cw-term-scan, .cw-term-dots i {
    animation: none !important;
  }
  .cw-badge, .cw-title, .cw-subtitle, .cw-search-card,
  .cw-cell, .cw-result-in .cw-avail, .cw-result-in .cw-result-id,
  .cw-result-in .cw-copy-btn, .cw-result-in .cw-cell, .cw-result-in .cw-output-card,
  .cw-feature {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .cw-wrap { padding: 12px 8px 30px; }
  .cw-hero { border-radius: 22px; padding: 30px 18px; }
  .cw-form { flex-direction: column; }
  .cw-btn { min-height: 50px; }
  .cw-result-head { flex-wrap: wrap; }
  .cw-copy-btn { margin-left: auto; }
  .cw-grid { grid-template-columns: 1fr; }
}