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

:root {
  --primary: #7c3aed;
  --primary-light: #ede9fe;
  --primary-dark: #5b21b6;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ── */
header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -.5px;
}
.logo span { color: var(--gray-400); font-weight: 400; }
.nav-links { display: flex; gap: .75rem; align-items: center; }
.btn-ghost {
  background: none;
  border: 1.5px solid var(--gray-200);
  padding: .45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--gray-600);
  font-weight: 500;
  transition: all .15s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .5rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--primary-dark); }
.user-chip {
  background: var(--primary-light);
  color: var(--primary);
  padding: .4rem .9rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
}

/* ── Upload area ── */
.upload-section { padding: 3rem 1.5rem 2rem; text-align: center; }
.upload-section h1 { font-size: 2.2rem; font-weight: 800; color: var(--gray-800); margin-bottom: .4rem; }
.upload-section h1 span { color: var(--primary); }
.upload-section p { color: var(--gray-600); font-size: 1.05rem; margin-bottom: 2rem; }

.drop-zone {
  border: 2.5px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  background: #fff;
  transition: all .2s;
  cursor: pointer;
  position: relative;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.drop-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--gray-400); }
.drop-zone.dragover .drop-icon { color: var(--primary); }
.drop-zone p { color: var(--gray-600); margin: 0; }
.drop-zone strong { color: var(--primary); }
.drop-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.file-limit { font-size: .8rem; color: var(--gray-400); margin-top: .5rem; }

/* ── Progress ── */
.progress-wrap { margin-top: 1.5rem; display: none; }
.progress-bar-bg {
  background: var(--gray-200);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 100px;
  transition: width .2s;
  width: 0%;
}
.progress-text { font-size: .85rem; color: var(--gray-600); margin-top: .4rem; }

/* ── Result card ── */
.result-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: none;
  text-align: left;
}
.result-card .filename { font-weight: 700; color: var(--gray-800); margin-bottom: .8rem; font-size: 1rem; }
.result-card .expires { font-size: .82rem; color: var(--gray-400); margin-bottom: 1rem; }
.link-box {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.link-box input {
  flex: 1;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .9rem;
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
}
.btn-copy {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.btn-copy:hover { background: var(--primary-dark); }
.btn-copy.copied { background: var(--success); }
.upload-another {
  margin-top: .8rem;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  padding: 0;
}

/* ── Plans ── */
.plans-section { padding: 2rem 1.5rem 3rem; }
.plans-section h2 { text-align: center; font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--gray-800); }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.plan-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1.5px solid var(--gray-200);
  transition: border-color .2s;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.featured { border-color: var(--primary); background: var(--primary-light); }
.plan-name { font-weight: 800; font-size: 1rem; margin-bottom: .5rem; color: var(--primary); }
.plan-price { font-size: 1.6rem; font-weight: 800; color: var(--gray-800); margin-bottom: .2rem; }
.plan-price span { font-size: .85rem; font-weight: 400; color: var(--gray-400); }
.plan-features { margin-top: 1rem; list-style: none; }
.plan-features li { font-size: .88rem; color: var(--gray-600); padding: .25rem 0; }
.plan-features li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
  position: relative;
}
.modal h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.5rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--gray-400);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--gray-600); }
.form-group input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: .65rem .9rem;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: var(--primary); }
.form-error { color: var(--danger); font-size: .83rem; margin-top: .4rem; display: none; }
.modal .btn-primary { width: 100%; padding: .75rem; font-size: 1rem; margin-top: .5rem; }
.modal-switch { text-align: center; margin-top: 1rem; font-size: .88rem; color: var(--gray-600); }
.modal-switch a { color: var(--primary); cursor: pointer; font-weight: 600; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--gray-800); color: #fff;
  padding: .75rem 1.2rem; border-radius: 10px;
  font-size: .9rem; z-index: 300;
  transform: translateY(80px); opacity: 0;
  transition: all .3s;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Dashboard ── */
.dashboard-header { padding: 2rem 1.5rem 1rem; }
.dashboard-header h1 { font-size: 1.6rem; font-weight: 800; }
.plan-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  margin-left: .5rem;
}
.files-section { padding: 0 1.5rem 3rem; }
.files-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--gray-600); }
.file-list { display: flex; flex-direction: column; gap: .75rem; }
.file-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.file-icon { font-size: 1.8rem; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: .8rem; color: var(--gray-400); margin-top: .15rem; }
.file-meta .expires-soon { color: var(--warning); font-weight: 600; }
.file-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.btn-icon {
  background: none; border: 1.5px solid var(--gray-200);
  border-radius: 8px; padding: .4rem .7rem;
  cursor: pointer; font-size: .85rem; transition: all .15s;
  color: var(--gray-600);
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-400); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.usage-bar-wrap { margin: .5rem 0 1.5rem; }
.usage-label { font-size: .83rem; color: var(--gray-600); margin-bottom: .4rem; }
.usage-bar-bg { background: var(--gray-200); border-radius: 100px; height: 6px; }
.usage-bar    { background: var(--primary); border-radius: 100px; height: 6px; transition: width .3s; }

/* ── Page wrapper (center + side ads) ── */
.page-wrapper {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.page-center { min-width: 0; }
.side-ad-wrap {
  padding: 1.5rem .75rem;
  position: sticky;
  top: 60px;
}
.side-ad {
  background: var(--gray-100);
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.side-ad .ad-label {
  position: absolute;
  top: .4rem; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.side-ad .ad-placeholder { min-height: 250px; }
.side-ad .ad-placeholder::after { content: '160 × 600'; }

@media (max-width: 1100px) {
  .page-wrapper { grid-template-columns: 1fr; }
  .side-ad-wrap { display: none; }
}

/* ── Language selector ── */
.lang-select {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: .4rem .6rem;
  font-size: .82rem;
  color: var(--gray-600);
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.lang-select:hover, .lang-select:focus { border-color: var(--primary); color: var(--primary); }

/* ── Upload hero highlight ── */
.upload-section h1 .highlight { color: var(--primary); }

/* ── Ad slots ── */
.ad-slot {
  background: var(--gray-100);
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.5rem auto;
  max-width: 900px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ad-slot-top  { margin-top: 2rem; }
.ad-slot-bottom { margin-bottom: 2rem; }
.ad-label {
  position: absolute;
  top: .4rem; left: .7rem;
  font-size: .7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ad-placeholder {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: .85rem;
}
.ad-placeholder::after { content: '728 × 90'; }

/* ── Download page ── */
.download-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.download-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  width: min(480px, 100%);
  text-align: center;
}
.dl-file-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.dl-file-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  word-break: break-all;
}
.dl-meta {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.dl-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  padding: .3rem 0;
}
.dl-meta-row + .dl-meta-row { border-top: 1px solid var(--gray-200); }
.dl-meta-label { color: var(--gray-400); }
.dl-meta-value { font-weight: 600; color: var(--gray-800); }
.btn-download {
  display: block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .85rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
  margin-bottom: 1.25rem;
}
.btn-download:hover { background: var(--primary-dark); }
.btn-back { background: var(--gray-600); }
.btn-back:hover { background: var(--gray-800); }
.dl-upsell { font-size: .85rem; color: var(--gray-400); }
.dl-upsell a { color: var(--primary); font-weight: 600; cursor: pointer; }
.dl-expired-msg { color: var(--gray-400); font-size: .9rem; margin: .75rem 0 1.5rem; }

/* ── Verify banner ── */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fefce8;
  border: 1.5px solid #fde047;
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  margin: 1.5rem 0 .5rem;
  font-size: .9rem;
  color: #854d0e;
}
.btn-resend {
  background: #eab308;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .4rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-resend:hover { background: #ca8a04; }
.btn-resend:disabled { background: var(--gray-400); cursor: default; }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .82rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .plans-grid { grid-template-columns: 1fr; }
  .upload-section h1 { font-size: 1.6rem; }
  .download-card { padding: 1.5rem 1rem; }
}
