/* Techclick URL Shortener — brand-matched dark theme with indigo/purple gradient.
   Mobile-first. Uses same design tokens as copy.techclick.in. */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(30, 30, 45, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b80;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle ambient gradient blobs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(168, 85, 247, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(14, 165, 233, 0.10), transparent);
  pointer-events: none;
  z-index: -1;
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ───── Header ───── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 36px; height: 36px;
  background: var(--gradient-1);
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
  box-shadow: var(--shadow-glow);
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--text-muted); margin-top: -2px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.nav a:hover { color: var(--text-primary); background: var(--bg-glass); }
.nav .cta {
  background: var(--gradient-1);
  color: white;
  padding: 8px 16px;
  font-weight: 600;
}
.nav .cta:hover { filter: brightness(1.12); background: var(--gradient-1); }

/* ───── Hero ───── */
.hero { padding: 56px 0 32px; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: var(--text-secondary);
  font-size: clamp(15px, 2.4vw, 18px);
  max-width: 620px;
  margin: 0 auto 32px;
}

/* ───── Shorten card ───── */
.shorten-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glow);
  max-width: 760px;
  margin: 0 auto;
}
.shorten-form { display: flex; flex-direction: column; gap: 12px; }
.input-row { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) {
  .input-row { flex-direction: row; align-items: stretch; }
  .input-row .url-input { flex: 1 1 auto; min-width: 0; }
  .input-row .btn-primary { width: auto; flex: 0 0 auto; min-width: 160px; }
}
.url-input, .slug-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.url-input::placeholder, .slug-input::placeholder { color: var(--text-muted); }
.url-input:focus, .slug-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.slug-input { font-family: 'Fira Code', Monaco, monospace; font-size: 14px; }

.advanced-toggle {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
  font-family: inherit;
  transition: color 0.2s;
}
.advanced-toggle:hover { color: var(--accent-light); }
.advanced { display: none; }
.advanced.open { display: block; }
.slug-prefix {
  font-family: 'Fira Code', Monaco, monospace;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.slug-prefix span { color: var(--accent-light); }

.btn-primary {
  width: 100%;
  background: var(--gradient-1);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

/* ───── Result ───── */
.result {
  display: none;
  margin-top: 16px;
  padding: 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  animation: slide-up 0.3s ease;
}
.result.show { display: block; }
.result-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.result-row { display: flex; gap: 8px; align-items: center; }
.result-url {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 12px 14px;
  border-radius: 8px;
  font-family: 'Fira Code', Monaco, monospace;
  font-size: 14px;
  outline: none;
  cursor: text;
  user-select: all;
  word-break: break-all;
}
.result-url:focus { border-color: var(--accent); }
.copy-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn.copied { background: var(--success); color: white; border-color: var(--success); }

.error-msg {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
  border-radius: var(--radius);
  font-size: 14px;
}
.error-msg.show { display: block; }

@keyframes slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Features grid ───── */
section.features { padding: 64px 0 24px; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-title p { color: var(--text-secondary); font-size: 15px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
}
.feature:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.feature-icon { font-size: 22px; margin-bottom: 10px; }
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.feature p { color: var(--text-secondary); font-size: 14px; }

/* ───── Pricing ───── */
section.pricing { padding: 56px 0 64px; }
.tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 720px) { .tier-grid { grid-template-columns: 1fr 1fr; } }
.tier {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.tier.pro { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.tier-badge {
  position: absolute;
  top: -10px; right: 20px;
  background: var(--gradient-1);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.tier-name { font-size: 14px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.tier-price { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.tier-price small { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.tier-tagline { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.tier-features { list-style: none; margin-bottom: 24px; }
.tier-features li {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-primary);
}
.tier-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}
.tier-features li.dim { color: var(--text-muted); }
.tier-features li.dim::before { color: var(--text-muted); content: '○'; }
.tier-cta {
  display: block;
  text-align: center;
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.tier.pro .tier-cta { background: var(--gradient-1); border-color: transparent; }
.tier-cta:hover { transform: translateY(-1px); }

/* ───── Footer ───── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 56px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
footer a { color: var(--accent-light); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ───── Toast ───── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ───── Advanced form ───── */
.adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 640px) {
  .adv-grid { grid-template-columns: 1fr 1fr; }
  .adv-field.full { grid-column: 1 / -1; }
}
.adv-field { display: flex; flex-direction: column; gap: 6px; }
.adv-field label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.adv-field label .hint { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.select-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b6b80' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ───── Result grid (URL + QR) ───── */
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
@media (min-width: 720px) {
  .result-grid { grid-template-columns: 1fr 200px; }
}
.qr-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qr-card canvas { width: 100%; max-width: 180px; height: auto; }
.qr-download {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: var(--transition);
}
.qr-download:hover { border-color: var(--accent); color: var(--accent-light); }

.result-meta {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
  align-items: center;
  flex-wrap: wrap;
}
.result-meta a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}
.result-meta a:hover { text-decoration: underline; }
.meta-info { color: var(--text-muted); font-size: 12px; }
.long-url {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
  font-family: 'Fira Code', Monaco, monospace;
}

/* ───── Trust strip ───── */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.trust-strip span { white-space: nowrap; }

/* ───── Recent links ───── */
.recent-section { padding: 32px 0 0; }
.section-title.compact { margin-bottom: 18px; }
.section-title h2 .muted { color: var(--text-muted); font-size: 0.6em; font-weight: 500; }
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
}
.recent-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  transition: var(--transition);
}
.recent-item:hover { border-color: var(--border-hover); }
.recent-item .ri-short {
  font-family: 'Fira Code', Monaco, monospace;
  color: var(--accent-light);
  font-weight: 600;
  white-space: nowrap;
}
.recent-item .ri-long {
  flex: 1;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.recent-item .ri-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.recent-item button {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.recent-item button:hover { border-color: var(--accent); color: var(--accent-light); }
.recent-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-ghost {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-light); }

/* ───── Tools grid ───── */
section.tools { padding: 56px 0 24px; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: var(--transition);
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.tool-icon { font-size: 26px; margin-bottom: 10px; }
.tool-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.tool-card p { color: var(--text-secondary); font-size: 13px; }

/* ───── Stats grid ───── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.stat-card.warn { border-color: rgba(245, 158, 11, 0.4); }
.stat-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.tag-chip {
  display: inline-block;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-family: 'Fira Code', Monaco, monospace;
  margin-right: 4px;
}

/* ───── Bulk results table ───── */
.bulk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bulk-table th, .bulk-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.bulk-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.bulk-table .long-cell {
  font-family: 'Fira Code', Monaco, monospace;
  color: var(--text-muted);
  word-break: break-all;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bulk-table .short-cell {
  font-family: 'Fira Code', Monaco, monospace;
  color: var(--accent-light);
  font-weight: 600;
  text-decoration: none;
}
.bulk-table .short-cell:hover { text-decoration: underline; }
.bulk-table .err-cell { color: var(--error); font-size: 12px; }

/* ───── API docs ───── */
.api-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.api-block h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.api-block p { color: var(--text-secondary); font-size: 14px; margin: 10px 0; }
.api-list { list-style: none; padding: 0; margin: 8px 0; }
.api-list li {
  font-size: 14px;
  padding: 6px 0;
  color: var(--text-primary);
}
.api-list li code { color: var(--accent-light); }
.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: 'Fira Code', Monaco, monospace;
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.55;
}
.code-block code { color: inherit; background: none; padding: 0; }

/* ───── QR tool page ───── */
.qr-result-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
}
.qr-result-wrap canvas { max-width: 100%; height: auto; }
.qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.qr-actions .btn-primary, .qr-actions .copy-btn { width: auto; min-width: 150px; }

/* ───── Auth widget ───── */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.auth-pill:hover { color: var(--text-primary); border-color: var(--accent); }
.auth-pill .av {
  width: 22px; height: 22px;
  background: var(--gradient-1);
  border-radius: 50%;
  color: white;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
}

/* ───── Mobile tweaks ───── */
@media (max-width: 540px) {
  .nav a:not(.cta):not(:last-of-type) { display: none; }
  .nav .cta { padding: 7px 12px; font-size: 13px; }
  .hero { padding: 36px 0 24px; }
  .shorten-card { padding: 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .header-row { padding: 12px 0; }
  .brand-name { font-size: 15px; }
  .brand-sub { font-size: 10px; }
  .result-grid { grid-template-columns: 1fr; }
  .qr-card { max-width: 200px; margin: 0 auto; }
  .recent-item { flex-wrap: wrap; }
  .recent-item .ri-long { width: 100%; }
}
