/* =============================================
   ZipURL - Public Frontend Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

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

:root {
  --bg:        #0d0f14;
  --surface:   #161921;
  --border:    #232733;
  --accent:    #6c63ff;
  --accent-2:  #a78bfa;
  --text:      #e8eaf0;
  --muted:     #8b92a8;
  --success:   #22c55e;
  --danger:    #ef4444;
  --warning:   #f59e0b;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,.35);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---- NAV ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 62px;
  background: rgba(13,15,20,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem; font-weight: 700;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 7px 14px; border-radius: 7px;
  font-size: .875rem; font-weight: 500;
  color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links .btn-nav {
  background: var(--accent); color: #fff;
  padding: 7px 18px;
}
.nav-links .btn-nav:hover { background: #5a52e0; color: #fff; }

/* ---- HERO ---- */
.hero {
  text-align: center;
  padding: 90px 5% 70px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108,99,255,.12); border: 1px solid rgba(108,99,255,.3);
  color: var(--accent-2); font-size: .8rem; font-weight: 500;
  padding: 5px 14px; border-radius: 999px;
  margin-bottom: 26px;
}
.hero-badge::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--accent); animation: pulse 2s infinite; }

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.4); }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero p {
  color: var(--muted); font-size: 1.05rem;
  max-width: 520px; margin: 0 auto 40px;
}

/* ---- SHORTEN CARD ---- */
.shorten-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.input-row {
  display: flex; gap: 10px; margin-bottom: 16px;
}

.input-row input {
  flex: 1;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: .95rem;
  padding: 13px 16px; border-radius: var(--radius);
  transition: border-color .2s;
  outline: none;
}
.input-row input:focus { border-color: var(--accent); }
.input-row input::placeholder { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; border: none;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5a52e0; color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c53030; }

/* ---- RESULT BOX ---- */
.result-box {
  background: rgba(108,99,255,.08);
  border: 1px solid rgba(108,99,255,.25);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px;
}
.result-url {
  font-family: monospace; font-size: .95rem;
  color: var(--accent-2); word-break: break-all;
}
.copy-btn {
  background: var(--accent); color: #fff;
  border: none; padding: 8px 16px; border-radius: 7px;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background .2s;
}
.copy-btn:hover { background: #5a52e0; }

/* ---- STATS STRIP ---- */
.stats-strip {
  display: flex; justify-content: center; gap: 60px;
  padding: 50px 5%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 60px 0;
}
.stat-item { text-align: center; }
.stat-item strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--accent-2);
}
.stat-item span { color: var(--muted); font-size: .875rem; }

/* ---- FEATURES ---- */
.features { padding: 20px 5% 80px; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem; font-weight: 700; margin-bottom: 10px;
}
.section-title p { color: var(--muted); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; max-width: 1100px; margin: 0 auto;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(108,99,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .875rem; line-height: 1.65; }

/* ---- FLASH ---- */
.flash {
  padding: 12px 18px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; margin-bottom: 18px;
}
.flash-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: #4ade80; }
.flash-error   { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #f87171; }
.flash-info    { background: rgba(108,99,255,.12); border: 1px solid rgba(108,99,255,.3); color: var(--accent-2); }

/* ---- FOOTER ---- */
footer {
  text-align: center; padding: 30px 5%;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .85rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent-2); }

/* ---- AUTH PAGES ---- */
.auth-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 42px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem; font-weight: 700; margin-bottom: 6px;
}
.auth-card .subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 7px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: .9rem;
  padding: 11px 14px; border-radius: var(--radius);
  transition: border-color .2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--muted); }
.form-group select option { background: var(--surface); }

.form-hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.btn-block { width: 100%; }

/* ---- DASHBOARD ---- */
.dash-layout {
  display: flex; min-height: 100vh;
}
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem; font-weight: 700;
  padding: 0 22px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar-logo span { color: var(--accent); }

.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 22px; color: var(--muted);
  font-size: .875rem; font-weight: 500;
  transition: color .2s, background .2s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--text); background: rgba(108,99,255,.08);
  border-left-color: var(--accent);
}
.sidebar-nav .nav-section {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  padding: 14px 22px 6px;
}

.main-content {
  flex: 1; padding: 32px 36px;
  overflow-x: hidden;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700;
}
.page-header p { color: var(--muted); font-size: .875rem; margin-top: 2px; }

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 30px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px;
}
.stat-card .label { color: var(--muted); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.stat-card .value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem; font-weight: 700; color: var(--text);
}
.stat-card .change { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---- TABLE ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
thead th {
  background: rgba(0,0,0,.2);
  padding: 11px 18px; text-align: left;
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.03); }
tbody td { padding: 13px 18px; font-size: .875rem; vertical-align: middle; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600;
}
.badge-success { background: rgba(34,197,94,.12); color: #4ade80; }
.badge-danger  { background: rgba(239,68,68,.12);  color: #f87171; }
.badge-warning { background: rgba(245,158,11,.12); color: #fbbf24; }
.badge-info    { background: rgba(108,99,255,.12); color: var(--accent-2); }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 20px; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  transition: all .2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px;
  width: 100%; max-width: 500px;
  box-shadow: var(--shadow);
}
.modal h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; }

/* ---- MISC ---- */
.short-url { font-family: monospace; font-size: .85rem; color: var(--accent-2); }
.original-url { color: var(--muted); font-size: .8rem; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-btns { display: flex; gap: 6px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 20px; }
  .stats-strip { flex-direction: column; gap: 30px; }
  .input-row { flex-direction: column; }
  .navbar { padding: 0 4%; }
}
