/* SellerShots — Modern CSS */
:root {
  --bg: #0d1117;
  --bg-light: #161b22;
  --bg-lighter: #21262d;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --primary: #58a6ff;
  --success: #3fb950;
  --error: #f85149;
  --warn: #d29922;
  --border: #30363d;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif; 
       background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn-primary, .btn-outline, .btn-nav { display: inline-block; padding: 10px 20px; border-radius: 6px; 
  font-weight: 600; text-align: center; cursor: pointer; border: 2px solid var(--primary); transition: all .2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #388bfd; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-nav { padding: 8px 16px; font-size: 14px; }
button { font-size: 16px; font-family: inherit; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.w-full { width: 100%; }

/* Landing Page */
.landing { background: linear-gradient(180deg, #0d1117 0%, #161b22 100%); }
.nav { border-bottom: 1px solid var(--border); padding: 16px 0; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.logo { font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 15px; }
.nav-links a:hover { color: var(--text); }

.hero { padding: 80px 20px; text-align: center; }
.hero-inner { max-width: 900px; margin: 0 auto; }
.badge { display: inline-block; background: var(--bg-lighter); border: 1px solid var(--border); padding: 6px 16px; 
  border-radius: 24px; font-size: 13px; margin-bottom: 20px; color: var(--text-dim); }
.hero h1 { font-size: 48px; line-height: 1.2; margin-bottom: 20px; background: linear-gradient(180deg, #fff 0%, var(--text) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { font-size: 20px; color: var(--text-dim); margin-bottom: 32px; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-cta .btn-primary { padding: 14px 32px; font-size: 18px; }
.trust { font-size: 14px; color: var(--text-dim); }
.demo-row { display: flex; gap: 20px; justify-content: center; margin-top: 60px; align-items: center; }
.demo-card { background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.demo-label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.demo-img { width: 200px; height: 200px; background: var(--bg-lighter); border-radius: 8px; }
.demo-img.before { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.demo-img.after { background: #fff; }
.arrow { font-size: 32px; color: var(--text-dim); }

.container { max-width: 1200px; margin: 0 auto; padding: 80px 20px; }
.features { background: var(--bg); }
.features h2, .marketplaces h2, .pricing h2 { text-align: center; font-size: 36px; margin-bottom: 48px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feat { background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; }
.feat-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.feat h3 { margin-bottom: 8px; }
.feat p { color: var(--text-dim); font-size: 15px; }

.marketplaces { background: var(--bg-light); }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.mp { background: var(--bg); border: 1px solid var(--border); padding: 20px; border-radius: 8px; text-align: center; font-weight: 600; }

.pricing { background: var(--bg); }
.pricing-sub { text-align: center; color: var(--text-dim); margin-bottom: 40px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1200px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .plan-grid { grid-template-columns: 1fr; }
}
.plan { background: var(--bg-light); border: 2px solid var(--border); border-radius: 12px; padding: 32px; text-align: center; position: relative; }
.plan-popular { border-color: var(--primary); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); 
  color: #fff; padding: 4px 16px; border-radius: 24px; font-size: 12px; font-weight: 700; }
.plan h3 { font-size: 24px; margin-bottom: 16px; }
.price { margin-bottom: 12px; }
.price .amt { font-size: 48px; font-weight: 700; color: var(--text); }
.price .per { font-size: 18px; color: var(--text-dim); }
.credits { font-size: 16px; color: var(--text-dim); margin-bottom: 24px; }
.plan-features { list-style: none; text-align: left; margin-bottom: 24px; }
.plan-features li { padding: 8px 0; color: var(--text-dim); }

.footer { background: var(--bg-light); border-top: 1px solid var(--border); padding: 40px 20px; text-align: center; }
.footer-links { margin-top: 12px; }
.footer-links a { color: var(--text-dim); margin: 0 12px; }

/* Auth Pages */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-box { background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; padding: 40px; width: 100%; 
  max-width: 420px; }
.auth-box .logo { display: block; text-align: center; margin-bottom: 24px; font-size: 24px; }
.auth-box h2 { text-align: center; margin-bottom: 24px; }
.auth-box label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.auth-box input { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; 
  color: var(--text); font-size: 15px; margin-bottom: 16px; }
.auth-box input:focus { outline: none; border-color: var(--primary); }
.auth-switch { text-align: center; margin-top: 20px; color: var(--text-dim); font-size: 14px; }
.alert-error { background: rgba(248,81,73,0.15); border: 1px solid var(--error); color: var(--error); padding: 12px; 
  border-radius: 6px; margin-bottom: 20px; }
.alert-warn { background: rgba(210,153,34,0.15); border: 1px solid var(--warn); color: var(--warn); padding: 12px; 
  border-radius: 6px; margin-bottom: 20px; }

/* App Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--bg-light); border-right: 1px solid var(--border); padding: 24px; 
  display: flex; flex-direction: column; }
.sidebar .logo { margin-bottom: 32px; display: block; }
.side-nav { flex: 1; }
.side-nav a { display: block; padding: 12px 16px; border-radius: 6px; color: var(--text-dim); margin-bottom: 6px; }
.side-nav a:hover, .side-nav a.active { background: var(--bg-lighter); color: var(--text); text-decoration: none; }
.credits-widget { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-top: 20px; }
.cw-plan { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.cw-bar-wrap { background: var(--bg-lighter); height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.cw-fill { background: var(--primary); height: 100%; transition: width 0.3s; }
.cw-text { font-size: 13px; color: var(--text-dim); }
.btn-upgrade { display: block; margin-top: 12px; text-align: center; padding: 8px; background: var(--primary); 
  color: #fff; border-radius: 6px; font-size: 14px; font-weight: 600; }

.main { flex: 1; padding: 40px; overflow-y: auto; }
.dash-header { margin-bottom: 32px; }
.dash-header h1 { font-size: 32px; margin-bottom: 8px; }
.page-sub { color: var(--text-dim); margin-bottom: 32px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 20px; text-align: center; }
.stat-val { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-lab { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

.section-title { font-size: 20px; margin-bottom: 20px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 40px; }
.action-card { background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; padding: 24px; 
  text-align: center; cursor: pointer; transition: all .2s; }
.action-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.ac-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.action-card h3 { margin-bottom: 8px; }
.action-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.ac-cost { display: inline-block; background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; 
  border-radius: 16px; font-size: 12px; color: var(--text-dim); }

.table-wrap { overflow-x: auto; }
.jobs-table { width: 100%; border-collapse: collapse; }
.jobs-table th { text-align: left; padding: 12px; background: var(--bg-light); border-bottom: 1px solid var(--border); 
  font-size: 13px; color: var(--text-dim); }
.jobs-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.dl-link { color: var(--primary); font-size: 14px; }

/* Upload Zone */
.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 60px 20px; text-align: center; 
  cursor: pointer; transition: all .2s; margin-bottom: 32px; }
.upload-zone:hover { border-color: var(--primary); background: var(--bg-light); }
.upload-zone.drag-over { border-color: var(--primary); background: var(--bg-light); }
.uz-icon { font-size: 64px; display: block; margin-bottom: 16px; }
.uz-sub { font-size: 14px; color: var(--text-dim); margin-top: 8px; }

.settings-panel { background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 32px; }
.settings-panel h3 { margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 24px; }
.setting-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.setting-group select, .setting-group input[type="text"] { width: 100%; padding: 10px; background: var(--bg); 
  border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.adjustments { margin-bottom: 24px; }
.adjustments h4 { margin-bottom: 16px; font-size: 16px; }
.adj-grid { display: grid; gap: 16px; }
.adj label { display: block; margin-bottom: 8px; font-size: 14px; }
.adj input[type="range"] { width: 100%; }

.progress-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; }
.spinner { border: 4px solid var(--border); border-top: 4px solid var(--primary); border-radius: 50%; 
  width: 48px; height: 48px; animation: spin 1s linear infinite; margin-bottom: 16px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.result-wrap { background: var(--bg-light); border: 1px solid var(--border); border-radius: 12px; padding: 32px; text-align: center; }
.result-images { display: flex; align-items: center; justify-content: center; gap: 32px; margin-bottom: 24px; }
.res-col { text-align: center; }
.res-label { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.res-col img { max-width: 300px; max-height: 300px; border-radius: 8px; border: 1px solid var(--border); }
.result-info { margin-bottom: 20px; color: var(--text-dim); }
.result-actions { display: flex; gap: 16px; justify-content: center; margin-top: 20px; }

.file-list { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 24px; 
  max-height: 300px; overflow-y: auto; }
.file-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); 
  font-size: 14px; }
.file-item:last-child { border-bottom: none; }

.batch-summary { background: var(--bg); border: 1px solid var(--border); padding: 16px; border-radius: 8px; 
  text-align: center; margin-bottom: 20px; }

.batch-files { margin-top: 16px; max-height: 300px; overflow-y: auto; }
.batch-file-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; 
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; }
.bf-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-size { font-size: 13px; color: var(--text-dim); margin: 0 12px; }
.bf-remove { background: transparent; border: none; color: var(--error); cursor: pointer; font-size: 18px; 
  padding: 4px 8px; border-radius: 4px; }
.bf-remove:hover { background: rgba(248,81,73,0.15); }

.checks-list { text-align: left; margin-bottom: 24px; }
.check-item { padding: 12px; background: var(--bg-light); border-left: 3px solid var(--border); border-radius: 4px; margin-bottom: 8px; }
.check-pass { border-color: var(--success); }
.check-fail { border-color: var(--error); }
.check-warn { border-color: var(--warn); }

.mp-select { width: 100%; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; 
  color: var(--text); font-size: 15px; margin-bottom: 20px; }

.current-plan-badge { display: inline-block; background: var(--bg-light); border: 1px solid var(--border); padding: 12px 24px; 
  border-radius: 8px; margin-bottom: 32px; }

/* Toast notification */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in .25s ease;
}
.toast-error   { background: #3d1a1a; border: 1px solid var(--error);   color: #ff8a84; }
.toast-success { background: #0f2d18; border: 1px solid var(--success); color: #6ee77e; }
.toast-warn    { background: #2d2106; border: 1px solid var(--warn);    color: #f0c060; }
.toast-fade    { animation: toast-out .3s ease forwards; }
@keyframes toast-in  { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; transform:translateY(0); }     to { opacity:0; transform:translateY(-12px); } }

/* ─── RESPONSIVE / MOBILE ──────────────────────────────────────────────────── */

/* Mobile menu toggle button — hidden on desktop */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* Landing page nav mobile button — hidden on desktop */
.nav-mobile-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
  .main { padding: 24px; }
  .hero h1 { font-size: 36px; }
  .hero .sub { font-size: 17px; }
  .demo-row { flex-direction: column; }
  .demo-img { width: 160px; height: 160px; }
  .result-images { flex-direction: column; gap: 16px; }
  .res-col img { max-width: 100%; }
  .arrow { transform: rotate(90deg); }
}

/* Mobile: up to 768px */
@media (max-width: 768px) {

  /* Sidebar becomes top nav on mobile */
  .app { flex-direction: column; }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: relative;
  }

  .sidebar .logo { margin-bottom: 0; flex: 1; }

  .mobile-menu-btn { display: block; }

  .side-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    z-index: 100;
    flex: unset;
  }

  .side-nav.open { display: block; }

  .side-nav a { margin-bottom: 4px; }

  .credits-widget {
    display: none; /* hidden in mobile top bar, show in menu instead */
  }

  .credits-widget.in-menu {
    display: block;
    margin-top: 12px;
  }

  /* Main content */
  .main { padding: 16px; }

  /* Stats row */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-val { font-size: 24px; }

  /* Action grid */
  .action-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .action-card { padding: 16px; }
  .ac-icon { font-size: 36px; }

  /* Settings grid */
  .settings-grid { grid-template-columns: 1fr; }

  /* Result images — stack vertically */
  .result-images { flex-direction: column; gap: 16px; }
  .res-col img { max-width: 100%; max-height: 250px; }
  .arrow { transform: rotate(90deg); font-size: 24px; }

  /* Upload zone */
  .upload-zone { padding: 32px 16px; }
  .uz-icon { font-size: 48px; }

  /* Plan grid — already handled above, ensure 1 col on mobile */
  .plan-grid { grid-template-columns: 1fr !important; }

  /* Table — horizontal scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .jobs-table { min-width: 500px; }

  /* Hero */
  .hero { padding: 40px 16px; }
  .hero h1 { font-size: 28px; }
  .hero .sub { font-size: 16px; }
  .hero-cta .btn-primary { padding: 12px 24px; font-size: 16px; width: 100%; }

  /* Nav links on landing */
  .nav-mobile-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 8px; border-radius: 6px; }
  .nav-links a:hover { background: var(--bg-lighter); }
  .nav-inner { position: relative; flex-wrap: wrap; }
  .nav-links a.btn-nav { text-align: center; margin-top: 4px; }

  /* Demo row */
  .demo-row { flex-direction: column; align-items: center; }
  .demo-img { width: 140px; height: 140px; }

  /* Features grid */
  .feat-grid { grid-template-columns: 1fr; }

  /* Batch file items */
  .batch-file-item { flex-wrap: wrap; gap: 8px; }
  .bf-name { min-width: 0; }

  /* Toast — full width on mobile */
  .toast { left: 12px; right: 12px; max-width: unset; top: 12px; }

  /* Auth box */
  .auth-box { padding: 24px 20px; }

  /* Buttons */
  .result-wrap .btn-primary,
  .result-wrap .btn-outline { width: 100%; margin-bottom: 8px; }

  /* Settings panel */
  .settings-panel { padding: 16px; }
}

/* Small mobile: up to 480px */
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .features h2, .marketplaces h2, .pricing h2 { font-size: 26px; }
  .plan .price .amt { font-size: 36px; }
  .mp-grid { grid-template-columns: repeat(2, 1fr); }
}
