/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a56db;
  --primary-dark: #1e429f;
  --primary-light: #e8f0fe;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --success: #059669;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.10);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}
.logo span { color: var(--text); }
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  margin-left: 24px;
  font-size: .95rem;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 32px 20px;
  font-size: .9rem;
  margin-top: 60px;
}
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer strong { color: var(--white); }

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 70px 20px 80px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}
.hero p.subtitle {
  font-size: 1.1rem;
  opacity: .85;
  max-width: 580px;
  margin: 0 auto 40px;
}

/* ── URL Form Card ───────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.url-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.url-form input[type="url"] {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
  color: var(--text);
}
.url-form input[type="url"]:focus { border-color: var(--primary); }
.url-form input[type="url"]::placeholder { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-copy {
  background: var(--success);
  color: var(--white);
  padding: 10px 20px;
  font-size: .9rem;
}
.btn-copy:hover { background: #047857; }
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Generated Link Result ───────────────────────────────── */
.result-box {
  margin-top: 24px;
  background: var(--primary-light);
  border: 1.5px solid #c7d7f9;
  border-radius: 10px;
  padding: 20px 24px;
  animation: fadeIn .4s ease;
}
.result-box .label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.result-link {
  flex: 1;
  background: var(--white);
  border: 1.5px solid #c7d7f9;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 1rem;
  color: var(--primary-dark);
  word-break: break-all;
  min-width: 0;
}

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}
.stats-bar strong { color: var(--text); }

/* ── Ad Placeholder ──────────────────────────────────────── */
.ad-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 32px 0;
}

/* ── Content / Article ───────────────────────────────────── */
.content-section { padding: 60px 0; }
.content-section h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -.3px;
}
.content-section .lead {
  font-size: 1.1rem;
  color: var(--muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.content-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 48px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.content-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
.content-section p { margin-bottom: 16px; color: #374151; }
.content-section ul, .content-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: #374151;
}
.content-section li { margin-bottom: 8px; }

/* ── Comparison Table ────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th {
  background: var(--primary);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: #374151;
}
tr:nth-child(even) td { background: var(--bg); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: background .2s;
}
.faq-question:hover { background: var(--bg); }
.faq-question .arrow { font-size: 1.2rem; transition: transform .3s; }
.faq-question.open .arrow { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 20px;
  color: var(--muted);
  background: var(--white);
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* ── Redirect / Countdown Page ───────────────────────────── */
.redirect-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 20px 0;
}
.redirect-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  animation: fadeIn .5s ease;
}
.redirect-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 28px 24px;
  text-align: center;
}
.redirect-header .shield { font-size: 2.5rem; margin-bottom: 8px; }
.redirect-header h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.redirect-header p { opacity: .8; font-size: .95rem; }
.redirect-body { padding: 32px 28px; }

.redirect-msg {
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.redirect-msg strong { color: var(--text); font-size: 1.2rem; }

/* SVG Countdown Ring */
.countdown-ring-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.countdown-ring { transform: rotate(-90deg); }
.ring-bg { stroke: #e5e7eb; }
.ring-progress {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.countdown-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-container { position: relative; width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; }
.ring-center { position: absolute; text-align: center; }
.ring-center .num { font-size: 2.8rem; font-weight: 900; color: var(--text); line-height: 1; }
.ring-center .sec-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 2px; }

.destination-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 18px;
}
.destination-box .dest-label { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.destination-box .dest-url { font-weight: 700; color: var(--text); font-size: 1.05rem; word-break: break-all; }
.redirect-note { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 20px; }

.btn-skip {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .2s;
}
.btn-skip-active {
  background: var(--primary);
  color: var(--white);
}
.btn-skip-active:hover { background: var(--primary-dark); }
.btn-skip-inactive {
  background: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
  border: 2px solid var(--border);
}

/* ── Error Page ──────────────────────────────────────────── */
.error-card {
  max-width: 420px;
  margin: 80px auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.error-icon { font-size: 3rem; margin-bottom: 16px; }
.error-card h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 12px; }
.error-card p { color: var(--muted); margin-bottom: 28px; }

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .url-form { flex-direction: column; }
  .url-form input[type="url"], .btn-primary { width: 100%; }
  .result-row { flex-direction: column; }
  .btn-copy { width: 100%; justify-content: center; }
  .nav-links { display: none; }
  .hero { padding: 50px 16px 60px; }
}
