/* ─── urlgo.io — Main Stylesheet ─── */
:root {
  --bg: #fafbfc; --white: #ffffff; --dark: #0f1729; --dark-soft: #1a2540;
  --text: #1a2540; --text-mid: #4a5568; --text-light: #8896ab;
  --blue: #2563eb; --blue-hover: #1d4ed8; --blue-soft: #dbeafe;
  --green: #10b981; --green-soft: #d1fae5;
  --orange: #f59e0b; --orange-soft: #fef3c7;
  --red: #ef4444; --red-soft: #fee2e2;
  --border: #e2e8f0; --border-hover: #cbd5e1;
  --radius: 10px; --radius-lg: 14px;
  --font-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 14px; line-height: 1.6; }
a { color: var(--blue); text-decoration: none; }
code, .mono { font-family: var(--font-mono); }
::selection { background: var(--blue-soft); color: var(--blue); }
::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
img { max-width: 100%; }

/* ─── NAVBAR ─── */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 4px; }
.nav-link { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-mid); transition: all 0.2s; }
.nav-link:hover { background: var(--blue-soft); color: var(--blue); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--blue); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 800; font-family: var(--font-display); }
.logo span { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.user-badge { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px; background: var(--bg); }
.avatar { width: 26px; height: 26px; border-radius: 7px; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; font-weight: 700; font-family: var(--font-display); }
.user-badge span { font-size: 13px; font-weight: 600; }

/* ─── BUTTONS ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 600; border: none; border-radius: var(--radius); cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-md { padding: 11px 24px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: transparent; color: var(--text-mid); } .btn-ghost:hover { background: var(--bg); }
.btn-secondary { background: var(--white); color: var(--text); border: 1.5px solid var(--border); } .btn-secondary:hover { background: var(--bg); }

/* ─── CARDS ─── */
.card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: all 0.25s; }
.card-hover:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

/* ─── LAYOUT ─── */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.page-header p { color: var(--text-light); font-size: 13px; margin-top: 2px; }

/* ─── BADGE ─── */
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-red { background: var(--red-soft); color: var(--red); }

/* ─── HERO ─── */
.hero { position: relative; overflow: hidden; padding: 80px 32px 60px; text-align: center; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-display); font-size: 48px; font-weight: 800; line-height: 1.1; margin: 16px auto; max-width: 700px; }
.hero-sub { font-size: 17px; color: var(--text-mid); max-width: 520px; margin: 0 auto 36px; line-height: 1.6; }

/* ─── SHORTEN BOX ─── */
.shorten-box { max-width: 640px; margin: 0 auto; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.shorten-box h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.shorten-form { display: flex; gap: 10px; }
.shorten-input { flex: 1; padding: 13px 18px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 15px; font-family: var(--font-body); outline: none; transition: border 0.2s; }
.shorten-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.shorten-desc { font-size: 13px; color: var(--text-light); margin-top: 14px; }
.result-box { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--green-soft); border-radius: var(--radius); border: 1.5px solid rgba(16,185,129,0.13); margin-top: 16px; }
.result-check { color: var(--green); font-weight: 700; }
.result-url { flex: 1; font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-mid); margin-bottom: 5px; letter-spacing: 0.3px; }
.form-group input, .select-input { width: 100%; padding: 11px 14px; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; font-family: var(--font-body); outline: none; transition: border 0.2s; }
.form-group input:focus, .select-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.form-row { display: flex; gap: 12px; margin-bottom: 14px; }
.alert { padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert-error { background: var(--red-soft); color: var(--red); }

/* ─── AUTH ─── */
.auth-page { max-width: 420px; margin: 0 auto; padding: 64px 32px; }
.auth-page h2 { font-family: var(--font-display); font-size: 28px; font-weight: 800; text-align: center; }
.auth-sub { color: var(--text-mid); font-size: 14px; text-align: center; margin: 6px 0 24px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-mid); }
.auth-switch a { color: var(--blue); font-weight: 700; }

/* ─── STATS ─── */
.stat-icon { font-size: 16px; margin-bottom: 6px; }
.stat-num { font-size: 28px; font-weight: 800; font-family: var(--font-display); }
.stat-label { font-size: 11px; color: var(--text-light); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-top: 2px; }
.step-num { font-size: 12px; font-weight: 700; color: var(--blue); font-family: var(--font-mono); margin-bottom: 8px; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 { font-family: var(--font-display); font-size: 32px; font-weight: 800; margin-top: 12px; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-val { font-size: 11px; color: var(--text-mid); font-family: var(--font-mono); }
.bar { width: 100%; max-width: 44px; border-radius: 5px; transition: height 0.4s; }
.bar-label { font-size: 10px; color: var(--text-light); font-family: var(--font-mono); }
.stat-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(226,232,240,0.3); font-size: 13px; }
.stat-row span:first-child { color: var(--text-mid); }

/* ─── LINKS ─── */
.link-row { display: flex; justify-content: space-between; align-items: center; }
.link-info { flex: 1; min-width: 0; }
.link-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.link-short { font-size: 15px; font-weight: 700; color: var(--blue); font-family: var(--font-mono); }
.link-target { font-size: 12px; color: var(--text-light); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-actions { display: flex; align-items: center; gap: 14px; }
.link-clicks { text-align: right; }
.clicks-num { font-size: 20px; font-weight: 800; font-family: var(--font-display); display: block; }
.clicks-label { font-size: 10px; color: var(--text-light); text-transform: uppercase; font-weight: 600; }
.link-detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.link-detail-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.link-detail-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.back-link { color: var(--text-mid); font-size: 14px; display: inline-block; margin-bottom: 20px; }
.api-key-box { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.api-key-box code { flex: 1; font-size: 13px; color: var(--blue); word-break: break-all; }

/* ─── TABLE ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; font-weight: 600; color: var(--text-mid); padding: 8px 10px; border-bottom: 1.5px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 6px 10px; border-bottom: 1px solid rgba(226,232,240,0.3); color: var(--text-mid); }

/* ─── AD PLACEHOLDER ─── */
.ad-placeholder-home { padding: 16px 24px; background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.ad-area { flex: 1; height: 60px; background: linear-gradient(90deg, var(--blue-soft), var(--orange-soft)); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 13px; }

/* ─── FOOTER ─── */
.footer { border-top: 1px solid var(--border); padding: 32px; text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 700; color: var(--text-light); font-size: 14px; }
.footer-copy { color: var(--text-light); font-size: 13px; margin-left: 12px; }

/* ─── RESPONSIVE ─── */

.mobile-menu-btn { display:none; }
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .shorten-form { flex-direction: column; }
  .form-row { flex-direction: column; }
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .link-row { flex-direction: column; gap: 10px; align-items: flex-start; }
  .link-actions { width: 100%; justify-content: space-between; }
}



/* ─── NAV EXTRAS ─── */
.nav-earn { color:#10b981 !important; font-weight:700 !important; }


/* ─── RESPONSIVE ─── */
@media (max-width:768px) {
  .mobile-menu-btn { display:block; }
  
  
  .nav-links { display:none; position:absolute; top:60px; left:0; right:0; background:#fff; border-bottom:1px solid var(--border); padding:8px 16px; flex-direction:column; z-index:99; box-shadow:0 8px 20px rgba(0,0,0,0.08); }
  .nav-links.nav-open { display:flex; }
  .navbar { padding:0 16px; }
  .user-name { display:none; }
  .hero { padding:24px 16px 20px !important; }
  .hero h1 { font-size:28px !important; }
  .hero-sub { font-size:14px !important; }
  .shorten-form { flex-direction:column; }
  .shorten-box { padding:18px !important; }
  .grid-2, .grid-3 { grid-template-columns:1fr; gap:10px; }
  .grid-4 { grid-template-columns:1fr 1fr; gap:8px; }
  .container { padding:0 14px; }
  .section-header h2 { font-size:22px; }
  .form-row { flex-direction:column; }
  .link-row { flex-direction:column; gap:10px; align-items:flex-start; }
  .link-actions { width:100%; justify-content:space-between; }
  .redirect-body { flex-direction:column; }
  .redirect-sidebar { width:100%; }
}
@media (max-width:480px) {
  .hero h1 { font-size:24px !important; }
  .grid-4 { grid-template-columns:1fr; }
  .nav-right .btn-sm { padding:6px 10px; font-size:12px; }
}

/* Mobile menu open state */
@media (max-width:768px) {
  .nav-links.nav-open { display:flex !important; flex-direction:column; }
}
