/* Launched — Modern product showcase platform */
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1a1a25;
  --border: #25253a;
  --text: #f0f0f5;
  --muted: #8a8a9e;
  --accent: #ff5e3a;
  --accent-2: #ff9966;
  --gradient: linear-gradient(135deg, #ff5e3a 0%, #ff9966 100%);
  --green: #00d4a3;
  --purple: #8b5cf6;
  --r: 12px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 30px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient);
  display: grid; place-items: center;
  color: #fff; font-size: 1.2rem; font-weight: 900;
  box-shadow: 0 8px 24px -8px rgba(255,94,58,0.5);
}
.brand-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.02em; }
.nav-search { flex: 1; max-width: 480px; position: relative; }
.nav-search input {
  width: 100%; padding: 11px 16px 11px 42px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text); font-size: 0.92rem;
  transition: all 0.2s;
}
.nav-search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.nav-search::before {
  content: '🔍'; position: absolute; left: 15px; top: 50%;
  transform: translateY(-50%); opacity: 0.6; font-size: 0.9rem;
}
.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link {
  padding: 8px 14px; border-radius: 8px; font-size: 0.92rem; font-weight: 500;
  color: var(--muted); transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 100px; font-weight: 600; font-size: 0.92rem;
  border: none; cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 24px -8px rgba(255,94,58,0.5); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(255,94,58,0.6); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* HERO */
.hero {
  padding: 70px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,94,58,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 24px;
  color: var(--accent-2); letter-spacing: 0.05em;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.05; margin-bottom: 18px;
  letter-spacing: -0.03em;
}
.hero h1 em { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 580px; margin: 0 auto 32px; }

/* TABS */
.tabs {
  display: flex; gap: 6px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; max-width: max-content; margin: 0 auto 40px;
}
.tab {
  padding: 10px 22px; border-radius: 100px; cursor: pointer;
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  border: none; background: transparent; transition: all 0.2s;
  font-family: inherit;
}
.tab.active { background: var(--gradient); color: #fff; }
.tab:hover:not(.active) { color: var(--text); }

/* LAYOUT */
.layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; padding-bottom: 80px; }
@media (max-width: 880px) { .layout { grid-template-columns: 1fr; } .sidebar { order: -1; } }

/* PRODUCT FEED */
.feed { display: flex; flex-direction: column; gap: 16px; }
.product-row {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 20px; align-items: center;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.2s;
  cursor: pointer;
}
.product-row:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-2px); }
.product-thumb {
  width: 80px; height: 80px; border-radius: 14px;
  background: var(--gradient); display: grid; place-items: center;
  font-size: 2rem; overflow: hidden; flex-shrink: 0;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { min-width: 0; }
.product-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.product-info .tagline { color: var(--muted); font-size: 0.95rem; margin-bottom: 8px; }
.product-meta { display: flex; gap: 14px; font-size: 0.78rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.product-meta .pill {
  padding: 3px 10px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 500;
}
.product-meta .pill.cat { background: rgba(255,94,58,0.1); color: var(--accent-2); border-color: rgba(255,94,58,0.3); }
.upvote {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 60px; height: 70px; padding: 8px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: all 0.15s;
  color: var(--muted); font-family: inherit;
}
.upvote:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.upvote.voted { background: rgba(255,94,58,0.12); border-color: var(--accent); color: var(--accent); }
.upvote .arrow { font-size: 1.1rem; line-height: 1; margin-bottom: 2px; }
.upvote .count { font-size: 1rem; font-weight: 700; color: var(--text); }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px;
}
.side-card h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.cat-list { list-style: none; }
.cat-list li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; transition: all 0.15s;
  font-size: 0.92rem;
}
.cat-list li a:hover { background: var(--surface-2); color: var(--accent-2); }
.cat-list .icon { margin-right: 10px; }
.cat-list .count { font-size: 0.78rem; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 100px; }

/* SUBMIT FORM */
.submit-page { max-width: 720px; margin: 0 auto; padding: 50px 24px 80px; }
.submit-page h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.submit-page .lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 36px; max-width: 540px; }
.steps { display: flex; gap: 12px; margin-bottom: 36px; }
.step {
  flex: 1; padding: 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  text-align: center;
}
.step.active { background: rgba(255,94,58,0.1); border-color: var(--accent); }
.step .num { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.step .label { font-weight: 600; font-size: 0.9rem; }
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block; margin-bottom: 8px; font-weight: 600;
  font-size: 0.88rem; color: var(--text);
}
.form-group .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.input, .textarea, .select {
  width: 100%; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.95rem;
  font-family: inherit; transition: all 0.2s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.textarea { min-height: 120px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }
.upload-zone {
  padding: 30px; border: 2px dashed var(--border); border-radius: 12px;
  text-align: center; cursor: pointer; transition: all 0.2s;
  background: var(--surface);
}
.upload-zone:hover { border-color: var(--accent); background: var(--surface-2); }
.upload-zone .icon { font-size: 2rem; margin-bottom: 8px; }
.upload-preview { margin-top: 16px; max-width: 200px; border-radius: 10px; overflow: hidden; }

/* PRODUCT DETAIL */
.detail-page { padding: 50px 0 80px; }
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 50px; }
@media (max-width: 880px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-head { display: flex; gap: 24px; margin-bottom: 30px; align-items: flex-start; }
.detail-thumb {
  width: 96px; height: 96px; border-radius: 18px; background: var(--gradient);
  display: grid; place-items: center; font-size: 2.4rem; flex-shrink: 0; overflow: hidden;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-head h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.detail-head .tagline { color: var(--muted); font-size: 1.1rem; margin-bottom: 14px; }
.detail-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.detail-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; margin-bottom: 24px; }
.detail-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; }
.detail-section p { color: var(--text); white-space: pre-wrap; }

/* PRICING */
.pricing-section h3 { font-size: 1.4rem; margin-bottom: 8px; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px;
  position: relative; transition: all 0.25s;
}
.price-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.price-card.featured {
  background: linear-gradient(180deg, rgba(255,94,58,0.08) 0%, var(--surface-2) 100%);
  border-color: var(--accent);
  box-shadow: 0 20px 60px -20px rgba(255,94,58,0.3);
}
.price-badge {
  position: absolute; top: -12px; right: 24px;
  background: var(--gradient); color: #fff;
  padding: 5px 14px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  box-shadow: 0 4px 16px -4px rgba(255,94,58,0.5);
}
.price-type { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.price-label { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }
.price-amount { display: flex; align-items: baseline; gap: 4px; margin-bottom: 22px; }
.price-amount .currency { font-size: 1.4rem; font-weight: 700; color: var(--muted); }
.price-amount .value { font-size: 3rem; font-weight: 900; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.02em; }
.price-amount .interval { font-size: 0.95rem; color: var(--muted); margin-left: 4px; }
.price-features { list-style: none; padding: 0; margin: 0 0 22px; }
.price-features li { padding: 7px 0; font-size: 0.88rem; color: var(--text); border-bottom: 1px solid var(--border); }
.price-features li:last-child { border: none; }
.price-secure { text-align: center; font-size: 0.75rem; color: var(--muted); margin-top: 12px; }
.pricing-note { text-align: center; padding: 16px; background: var(--surface-2); border-radius: 10px; font-size: 0.88rem; color: var(--muted); }

/* COMMENTS */
.comment {
  display: flex; gap: 14px; padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient); display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 0.95rem; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-body .author { font-weight: 600; font-size: 0.92rem; }
.comment-body .time { color: var(--muted); font-size: 0.78rem; margin-left: 8px; }
.comment-body p { margin-top: 4px; color: var(--text); }
.comment-form { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; }
.comment-form textarea {
  flex: 1; min-height: 60px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-family: inherit; resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }

/* AUTH */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 50px 24px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 44px;
  max-width: 440px; width: 100%;
  box-shadow: var(--shadow);
}
.auth-card h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; text-align: center; }
.auth-card .subtitle { color: var(--muted); text-align: center; margin-bottom: 30px; }
.auth-card .form-group { margin-bottom: 16px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* PROFILE */
.profile-head {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 36px;
  display: flex; gap: 28px; align-items: center; margin: 40px 0 30px;
}
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--gradient); display: grid; place-items: center;
  font-weight: 800; font-size: 2.4rem; color: #fff;
}
.profile-info h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.profile-info .username { color: var(--muted); margin-bottom: 8px; }
.profile-info p { color: var(--text); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 30px; margin-top: 80px;
  text-align: center; color: var(--muted); font-size: 0.85rem;
}
.footer a { color: var(--accent-2); }

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--accent);
  padding: 14px 26px; border-radius: 100px;
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: all 0.3s; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ADMIN */
.admin-page { padding: 50px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px;
}
.stat-card .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat-card .value { font-size: 2rem; font-weight: 800; margin-top: 6px; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 720px) {
  .nav-search { display: none; }
  .nav-inner { gap: 12px; }
  .product-row { grid-template-columns: 60px 1fr auto; padding: 16px; gap: 14px; }
  .product-thumb { width: 60px; height: 60px; }
  .detail-head { flex-direction: column; }
  .hero { padding: 50px 0 30px; }
}

/* ── SHARE MODAL ─────────────────────────────────────────── */
.share-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 999; backdrop-filter: blur(4px);
}
.share-panel {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100vw); background: #13131a;
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 16px 16px 0 0; padding: 28px 24px 36px;
  z-index: 1000; animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateX(-50%) translateY(40px); opacity:0; } to { transform: translateX(-50%) translateY(0); opacity:1; } }
.share-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--fg); }
.share-url { display: flex; gap: 8px; margin-bottom: 20px; }
.share-url input {
  flex: 1; background: #0d0d12; border: 1px solid var(--border);
  color: var(--muted); border-radius: 8px; padding: 8px 12px;
  font-size: 0.82rem; font-family: monospace;
}
.share-url button {
  background: var(--accent); color: #000; border: none;
  border-radius: 8px; padding: 8px 16px; font-weight: 700;
  cursor: pointer; font-size: 0.85rem; white-space: nowrap;
}
.share-links { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  flex: 1; min-width: 120px; padding: 10px 14px;
  border-radius: 8px; text-decoration: none; font-size: 0.83rem;
  font-weight: 600; text-align: center; transition: opacity .15s;
}
.share-btn:hover { opacity: 0.85; }
.share-tw { background: #000; color: #fff; border: 1px solid #333; }
.share-li { background: #0077b5; color: #fff; }
.share-rd { background: #ff4500; color: #fff; }
.share-hn { background: #ff6600; color: #fff; }
.share-wa { background: #25d366; color: #fff; }

/* Share inline button in product meta */
.share-btn-row {
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: 6px; padding: 3px 10px;
  font-size: 0.78rem; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.share-btn-row:hover { border-color: var(--accent); color: var(--accent); }

/* ── VIRAL BANNER ────────────────────────────────────────── */
.viral-banner {
  background: linear-gradient(135deg, #0d0d14 0%, #111120 100%);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 28px 32px; margin-bottom: 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.viral-banner-text h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--fg); }
.viral-banner-text p { margin: 0; font-size: 0.87rem; color: var(--muted); }
.viral-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.viral-share-btn {
  padding: 9px 18px; border-radius: 8px; text-decoration: none;
  font-size: 0.83rem; font-weight: 600; white-space: nowrap;
  transition: opacity .15s;
}
.viral-share-btn:hover { opacity: 0.85; }
