/* ============================================
   xURL.cz — Neon Terminal Redesign
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === DARK THEME (default) === */
[data-theme="dark"] {
  --bg-deep: #07080d;
  --bg-surface: #0d0f17;
  --bg-card: rgba(14, 17, 28, 0.72);
  --bg-card-hover: rgba(20, 24, 42, 0.82);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 240, 255, 0.15);

  --cyan: #00f0ff;
  --cyan-dim: #00a5b0;
  --cyan-glow: rgba(0, 240, 255, 0.25);
  --magenta: #ff2d7b;
  --magenta-glow: rgba(255, 45, 123, 0.2);
  --green: #00ff88;
  --green-soft: rgba(0, 255, 136, 0.5);
  --yellow: #ffe14d;
  --orange: #ff8c42;

  --text-primary: #e8ecf4;
  --text-secondary: #7a8299;
  --text-tertiary: #454d64;

  --input-bg: rgba(255, 255, 255, 0.03);
  --input-focus-bg: rgba(0, 240, 255, 0.02);
  --result-bg: rgba(0, 255, 136, 0.03);
  --result-border: rgba(0, 255, 136, 0.12);
  --result-url-box-bg: rgba(0, 0, 0, 0.3);
  --error-bg: rgba(255, 45, 123, 0.08);
  --error-border: rgba(255, 45, 123, 0.2);
  --badge-bg: rgba(255, 140, 66, 0.08);
  --badge-border: rgba(255, 140, 66, 0.15);
  --history-item-bg: rgba(255, 255, 255, 0.02);
  --stat-row-bg: rgba(255, 255, 255, 0.02);
  --ghost-bg: rgba(0, 240, 255, 0.06);
  --ghost-border: rgba(0, 240, 255, 0.2);
  --ghost-hover-bg: rgba(0, 240, 255, 0.12);
  --ghost-hover-border: rgba(0, 240, 255, 0.4);
  --ghost-success-bg: rgba(0, 255, 136, 0.08);
  --ghost-success-border: rgba(0, 255, 136, 0.25);
  --outline-hover-border: rgba(255, 255, 255, 0.15);
  --outline-hover-bg: rgba(255, 255, 255, 0.03);
  --hero-badge-bg: rgba(0, 240, 255, 0.08);
  --hero-badge-border: rgba(0, 240, 255, 0.15);
  --history-icon-bg: rgba(255, 255, 255, 0.03);
  --error-icon-bg: rgba(255, 45, 123, 0.08);
  --error-icon-border: rgba(255, 45, 123, 0.15);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%237a8299' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --color-scheme: dark;
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg-deep: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(240, 243, 248, 0.9);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(0, 140, 200, 0.15);

  --cyan: #0090b8;
  --cyan-dim: #006d8a;
  --cyan-glow: rgba(0, 144, 184, 0.18);
  --magenta: #d6246a;
  --magenta-glow: rgba(214, 36, 106, 0.12);
  --green: #00a854;
  --green-soft: rgba(0, 168, 84, 0.4);
  --yellow: #c49800;
  --orange: #d97020;

  --text-primary: #1a1d26;
  --text-secondary: #5c6478;
  --text-tertiary: #9aa0b0;

  --input-bg: rgba(0, 0, 0, 0.02);
  --input-focus-bg: rgba(0, 144, 184, 0.03);
  --result-bg: rgba(0, 168, 84, 0.04);
  --result-border: rgba(0, 168, 84, 0.15);
  --result-url-box-bg: rgba(0, 0, 0, 0.03);
  --error-bg: rgba(214, 36, 106, 0.06);
  --error-border: rgba(214, 36, 106, 0.15);
  --badge-bg: rgba(217, 112, 32, 0.08);
  --badge-border: rgba(217, 112, 32, 0.18);
  --history-item-bg: rgba(0, 0, 0, 0.015);
  --stat-row-bg: rgba(0, 0, 0, 0.02);
  --ghost-bg: rgba(0, 144, 184, 0.06);
  --ghost-border: rgba(0, 144, 184, 0.2);
  --ghost-hover-bg: rgba(0, 144, 184, 0.1);
  --ghost-hover-border: rgba(0, 144, 184, 0.35);
  --ghost-success-bg: rgba(0, 168, 84, 0.08);
  --ghost-success-border: rgba(0, 168, 84, 0.2);
  --outline-hover-border: rgba(0, 0, 0, 0.15);
  --outline-hover-bg: rgba(0, 0, 0, 0.03);
  --hero-badge-bg: rgba(0, 144, 184, 0.07);
  --hero-badge-border: rgba(0, 144, 184, 0.15);
  --history-icon-bg: rgba(0, 0, 0, 0.03);
  --error-icon-bg: rgba(214, 36, 106, 0.06);
  --error-icon-border: rgba(214, 36, 106, 0.12);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235c6478' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-display);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Ambient background — dark only */
[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 240, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(255, 45, 123, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(14, 17, 28, 1) 0%, var(--bg-deep) 100%);
  pointer-events: none;
}

/* Ambient background — light */
[data-theme="light"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 5%, rgba(0, 144, 184, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 85%, rgba(214, 36, 106, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 50%, #f4f6f9 0%, var(--bg-deep) 100%);
  pointer-events: none;
}

/* Grid overlay — dark only */
[data-theme="dark"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 0%, transparent 100%);
}

/* Grid overlay — light */
[data-theme="light"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 0%, transparent 100%);
}

/* Scanlines — dark only */
[data-theme="dark"] .scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.4;
}

[data-theme="light"] .scanlines { display: none; }

/* Smooth theme transition */
body,
.glass-card,
.input-field,
.select-field,
.input-group-prefix,
.btn-neon,
.btn-ghost,
.btn-outline-sm,
.btn-back,
.nav-logo-icon,
.result-panel,
.error-toast,
.history-item,
.stat-row,
.hero-badge,
.history-icon,
.site-footer {
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Layout */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav-bar {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeSlideDown 0.8s var(--ease-out-expo) both;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 0.8; }

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--bg-deep);
}

.nav-logo-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
}
.nav-logo-text span {
  color: var(--text-tertiary);
  font-weight: 400;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 36px;
  animation: fadeSlideUp 0.9s 0.1s var(--ease-out-expo) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 8px;
  border-radius: 100px;
  background: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 32px;
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp 1s 0.2s var(--ease-out-expo) both;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), rgba(255, 45, 123, 0.2), transparent);
}

/* Form */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.3s var(--ease-out-expo);
  -webkit-appearance: none;
}

.input-field::placeholder { color: var(--text-tertiary); font-weight: 400; }

.input-field:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow), 0 0 30px -10px var(--cyan-glow);
  background: var(--input-focus-bg);
}

.input-field.input-lg {
  padding: 18px 20px;
  font-size: 17px;
}

.input-group-prefix {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-glass);
  transition: all 0.3s var(--ease-out-expo);
  background: var(--input-bg);
}

.input-group-prefix:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--input-bg);
  border-right: 1px solid var(--border-glass);
  white-space: nowrap;
  user-select: none;
}

.input-group-prefix .input-field {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.select-field {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--input-bg);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  -webkit-appearance: none;
  appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.select-field:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.select-field option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-family: var(--font-mono);
}

/* Buttons */
.btn-neon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 24px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--cyan) 0%, #00c8d6 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
  margin-top: 8px;
}

.btn-neon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-neon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--cyan-glow), 0 0 60px -20px var(--cyan-glow);
}
.btn-neon:hover::before { opacity: 1; }
.btn-neon:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px var(--cyan-glow);
}

.btn-neon svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  background: var(--ghost-bg);
  border: 1.5px solid var(--ghost-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}

.btn-ghost:hover {
  background: var(--ghost-hover-bg);
  border-color: var(--ghost-hover-border);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.btn-ghost.btn-success-state {
  color: var(--green);
  background: var(--ghost-success-bg);
  border-color: var(--ghost-success-border);
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-outline-sm:hover {
  color: var(--text-primary);
  border-color: var(--outline-hover-border);
  background: var(--outline-hover-bg);
}

/* Error toast */
.error-toast {
  display: none;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--magenta);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  margin-top: 16px;
  animation: shake 0.4s var(--ease-out-expo);
}
.error-toast.visible { display: block; }

/* Result panel */
.result-panel {
  display: none;
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--result-bg);
  border: 1px solid var(--result-border);
  position: relative;
  overflow: hidden;
  animation: resultReveal 0.6s var(--ease-out-expo) both;
}
.result-panel.visible { display: block; }

.result-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.5;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.result-header-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-soft);
  animation: pulse-dot 2s ease-in-out infinite;
}

.result-header-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
}

.result-url-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--result-url-box-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-bottom: 16px;
}

.result-url-link {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s;
}
.result-url-link:hover {
  color: #66f7ff;
  text-shadow: 0 0 20px var(--cyan-glow);
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.result-meta {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

.result-qr {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  background: white;
  padding: 4px;
  flex-shrink: 0;
}
.result-qr img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: block;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-detail {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.result-detail strong { color: var(--text-primary); font-weight: 600; }
.result-detail a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}
.result-detail a:hover { color: #66f7ff; text-decoration: underline; }

/* Custom expire */
.custom-expire-box { display: none; margin-top: 10px; }
.custom-expire-box.visible { display: block; }
input[type="datetime-local"].input-field { color-scheme: var(--color-scheme); }

/* History */
.history-section {
  margin-top: 40px;
  margin-bottom: 60px;
  animation: fadeSlideUp 1s 0.4s var(--ease-out-expo) both;
}

.history-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.history-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--history-icon-bg);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.history-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.history-empty-icon {
  font-size: 28px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--history-item-bg);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.history-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass);
}

.history-item-url {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.history-item-short {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-short:hover { color: #66f7ff; }

.history-item-original {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--orange);
  border: 1px solid var(--badge-border);
  white-space: nowrap;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-glass);
  margin-top: auto;
}
.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--cyan); }

/* Stats page */
.stats-card { animation: fadeSlideUp 0.8s var(--ease-out-expo) both; }

.stats-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.stats-title-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-title h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stat-row {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--stat-row-bg);
  border: 1px solid var(--border-glass);
  gap: 16px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  min-width: 130px;
  padding-top: 2px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}
.stat-value a { color: var(--cyan); text-decoration: none; }
.stat-value a:hover { text-decoration: underline; }

.stat-value.stat-visits {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-back { margin-top: 24px; }

/* Error page */
.error-card {
  text-align: center;
  padding: 60px 32px;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) both;
}

.error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--error-icon-bg);
  border: 1px solid var(--error-icon-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--magenta);
}

.error-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.error-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--cyan), #00c8d6);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.3s var(--ease-out-expo);
}
.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--cyan-glow);
}

/* SEO bar */
.seo-bar {
  text-align: center;
  padding: 24px 0;
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.7;
  animation: fadeSlideUp 1s 0.3s var(--ease-out-expo) both;
}
.seo-bar strong { color: var(--text-secondary); }

/* Animations */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes resultReveal {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* Light theme card shadow */
[data-theme="light"] .glass-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
}

[data-theme="light"] .glass-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 144, 184, 0.2), rgba(214, 36, 106, 0.12), transparent);
}

[data-theme="light"] .result-panel::before {
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.3;
}

[data-theme="light"] .result-url-link:hover {
  color: #006d8a;
  text-shadow: none;
}

[data-theme="light"] .history-item-short:hover {
  color: #006d8a;
}

[data-theme="light"] .btn-neon {
  background: linear-gradient(135deg, var(--cyan) 0%, #007a98 100%);
  color: #ffffff;
}

[data-theme="light"] .btn-back {
  background: linear-gradient(135deg, var(--cyan), #007a98);
  color: #ffffff;
}

[data-theme="light"] .nav-logo-icon {
  color: #ffffff;
}

/* === Theme Toggle === */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 100;
  animation: fadeSlideDown 0.8s 0.3s var(--ease-out-expo) both;
}

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border-glass);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-out-expo);
  padding: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: scale(1.08);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease-out-expo);
}

.theme-toggle-btn:hover svg {
  transform: rotate(20deg);
}

.theme-icon-sun,
.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* Responsive */
@media (max-width: 600px) {
  .glass-card { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .result-panel { padding: 20px; }
  .result-url-box { flex-direction: column; gap: 10px; }
  .result-meta { flex-direction: column; align-items: center; text-align: center; }
  .result-actions { justify-content: center; }
  .history-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stat-row { flex-direction: column; gap: 4px; }
  .stat-label { min-width: auto; }
  .hero { padding: 32px 0 28px; }
}
