/* ═══════════════════════════════════════════
   KazançBox — Link Kısalt CSS
   Mobile-first, responsive
═══════════════════════════════════════════ */

/* ── RESET & TOKENS ── */
:root {
  --bg:       #07090F;
  --card:     #111827;
  --card2:    #1a2235;
  --accent:   #6C63FF;
  --accent2:  #8B5CF6;
  --text:     #F1F5F9;
  --muted:    #8B949E;
  --border:   #1E2A3A;
  --green:    #10B981;
  --red:      #EF4444;
  --yellow:   #F59E0B;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --nav-h:     60px;

  --shadow-card: 0 4px 24px rgba(0,0,0,.45);
}

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  opacity: 0;
  transition: opacity .3s ease;
  overflow-x: hidden;
}
body.loaded { opacity: 1; }

/* ═══════════════════
   NAVBAR
═══════════════════ */
#navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--nav-h);
  background: rgba(7,9,15,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 900;
  gap: 8px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

/* Desktop center links — hidden on mobile */
.nav-center {
  display: none;
  align-items: center;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  color: var(--muted);
  font-size: .83rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--card); }
.nav-store { color: var(--accent) !important; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown .trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: .2s;
  user-select: none;
  white-space: nowrap;
}
.dropdown.open .trigger { color: var(--text); background: var(--card); }
.chevron { width: 14px; height: 14px; transition: transform .2s; }
.dropdown.open .chevron { transform: rotate(180deg); }

.drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 210px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.7);
  z-index: 1001;
}
.dropdown.open .drop-menu { display: block; }
.drop-menu a {
  display: block;
  padding: 11px 16px;
  color: var(--text);
  font-size: .83rem;
  border-bottom: 1px solid var(--border);
  transition: background .2s, padding-left .15s;
}
.drop-menu a:last-child { border-bottom: none; }
.drop-menu a:hover { background: var(--accent); color: #fff; padding-left: 22px; }

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-login {
  background: var(--accent);
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .82rem;
  transition: opacity .2s;
  white-space: nowrap;
}
.btn-login:hover { opacity: .85; }

/* Avatar / profile */
#profile-wrapper {
  display: none;
  position: relative;
  cursor: pointer;
}
#avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  border: 2px solid var(--border);
  color: #fff;
  user-select: none;
}
#profile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 210px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  z-index: 1001;
}
#profile-wrapper.open #profile-menu { display: block; }
.pm-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pm-name-t { font-weight: 700; font-size: .86rem; }
.pm-email-t { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.pm-bal {
  padding: 10px 16px;
  background: rgba(108,99,255,.1);
  color: var(--accent);
  font-weight: 800;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
#profile-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  color: var(--text);
  font-size: .83rem;
  border-bottom: 1px solid var(--border);
  transition: .2s;
  cursor: pointer;
}
#profile-menu a:last-child { border-bottom: none; color: var(--red); }
#profile-menu a:hover { background: var(--accent); color: #fff; padding-left: 22px; }

/* ── Hamburger ── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Menu Overlay ── */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--card2);
  border-bottom: 1px solid var(--border);
  z-index: 800;
  transform: translateY(-110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-h));
}
.mobile-menu.open { transform: translateY(0); }

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 799;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.mobile-overlay.visible { display: block; }

.mobile-menu-inner { padding: 12px 0 24px; }
.mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.mobile-link:hover, .mobile-link.active { background: rgba(108,99,255,.1); color: var(--accent); }
.mobile-link:last-child { border-bottom: none; }
.mobile-store { color: var(--accent) !important; font-weight: 700; }
.mobile-section-title {
  padding: 10px 20px 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════
   PAGE LAYOUT
═══════════════════ */
.page {
  padding: 20px 16px 48px;
  max-width: 700px;
  margin: 0 auto;
}

/* ═══════════════════
   CREATE BOX
═══════════════════ */
.create-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.create-box-header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.create-box-header p {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.text-green { color: var(--green); }

.notif {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 12px;
  display: none;
  word-break: break-all;
}
.notif.ok  { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: var(--green); }
.notif.err { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: var(--red); }

/* Input row — stacks on mobile */
.input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input-row input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.input-row input:focus { border-color: var(--accent); }
.input-row input::placeholder { color: var(--muted); font-size: .85rem; }

.btn-shorten {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-size: .92rem;
  transition: opacity .2s, transform .2s;
  width: 100%;
}
.btn-shorten:hover { opacity: .9; transform: translateY(-1px); }
.btn-shorten:active { transform: translateY(0); }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ═══════════════════
   STATS STRIP
═══════════════════ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-icon { font-size: 1rem; margin-bottom: 4px; }
.stat-card .num {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-card .lbl {
  font-size: .62rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}
.stat-earn-card .earn-num { color: var(--green); }

/* ═══════════════════
   LINKS SECTION
═══════════════════ */
.links-section { margin-bottom: 24px; }

.section-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}

.link-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.link-item:hover { border-color: var(--accent); box-shadow: 0 2px 16px rgba(108,99,255,.12); }

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.link-content { min-width: 0; flex: 1; }
.link-text { font-size: .85rem; color: var(--accent); font-weight: 600; word-break: break-all; }
.link-meta { font-size: .72rem; color: var(--muted); margin-top: 3px; word-break: break-all; }
.link-earn { font-size: .78rem; color: var(--green); font-weight: 700; margin-top: 6px; }

.link-stats {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ls {
  font-size: .7rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.ls-blue   { background: rgba(59,130,246,.1);  color: #60A5FA; }
.ls-green  { background: rgba(16,185,129,.1);  color: var(--green); }
.ls-yellow { background: rgba(245,158,11,.1);  color: var(--yellow); }
.ls-red    { background: rgba(239,68,68,.1);   color: var(--red); }

.btn-copy {
  padding: 8px 14px;
  background: rgba(108,99,255,.1);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: .78rem;
  white-space: nowrap;
  transition: .2s;
  flex-shrink: 0;
  align-self: flex-start;
}
.btn-copy:hover { background: var(--accent); color: #fff; }

.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
  font-size: .85rem;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* ═══════════════════
   LIVE FEED
═══════════════════ */
.live-feed { margin-bottom: 24px; }
.live-feed-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.live-feed-head h3 { font-size: .9rem; font-weight: 700; color: var(--muted); }

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 7px;
  animation: fadeIn .4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feed-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem;
  color: #fff; flex-shrink: 0;
}
.feed-text { flex: 1; font-size: .78rem; color: var(--muted); min-width: 0; }
.feed-text strong { color: var(--text); }
.feed-earn { color: var(--green); font-weight: 800; font-size: .82rem; white-space: nowrap; }
.feed-time { color: var(--muted); font-size: .68rem; white-space: nowrap; }

/* ═══════════════════
   GATE PAGE
═══════════════════ */
.gate-box {
  max-width: 360px;
  margin: 60px auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 28px;
  box-shadow: var(--shadow-card);
}
.gate-icon { font-size: 2.5rem; margin-bottom: 12px; }
.gate-box h2 { font-size: 1.2rem; margin-bottom: 8px; }
.gate-box p  { color: var(--muted); font-size: .87rem; margin-bottom: 24px; line-height: 1.5; }
.gate-btn {
  display: inline-block;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9rem;
  transition: opacity .2s, transform .2s;
}
.gate-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ═══════════════════════════════════
   TABLET  (≥ 600px)
═══════════════════════════════════ */
@media (min-width: 600px) {
  :root { --nav-h: 64px; }

  #navbar { padding: 0 24px; }

  .logo { font-size: 1.3rem; }

  .page { padding: 28px 24px 56px; }

  .create-box { padding: 24px; }
  .create-box-header h2 { font-size: 1.05rem; }

  .input-row { flex-direction: row; }
  .btn-shorten { width: auto; flex-shrink: 0; padding: 14px 22px; }

  .stats-strip { gap: 12px; }
  .stat-card { padding: 14px 10px; }
  .stat-card .num { font-size: 1.2rem; }
  .stat-card .lbl { font-size: .67rem; }

  .link-item { padding: 16px 18px; }
}

/* ═══════════════════════════════════
   DESKTOP  (≥ 900px)
═══════════════════════════════════ */
@media (min-width: 900px) {
  :root { --nav-h: 68px; }

  #navbar { padding: 0 6%; }
  .logo { font-size: 1.45rem; }

  /* Show desktop nav, hide hamburger */
  .nav-center { display: flex; }
  .hamburger  { display: none; }

  .page { padding: 40px 6% 60px; }

  .create-box { padding: 26px 28px; }
  .stats-strip { gap: 14px; }
  .stat-card .num { font-size: 1.3rem; }
  .stat-card .lbl { font-size: .7rem; }

  .link-item { padding: 16px 20px; }
  .link-text  { font-size: .88rem; }
  .link-meta  { font-size: .75rem; }

  .gate-box { margin: 80px auto; padding: 50px 40px; }
}

/* ═══════════════════
   REDUCED MOTION
═══════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}