/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f1117;
  --bg2:       #161b27;
  --bg3:       #1e2535;
  --bg4:       #252d3d;
  --border:    #2a3347;
  --accent:    #f5a623;
  --accent2:   #e8941a;
  --blue:      #4a9eff;
  --green:     #2ecc71;
  --red:       #e74c3c;
  --text:      #e8eaf0;
  --text2:     #8b95a8;
  --text3:     #5a6478;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Push footer to bottom */
.header ~ * { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.accent { color: var(--accent); }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #0f1117;
}
.btn--primary:hover { background: var(--accent2); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--blue {
  background: var(--blue);
  color: #fff;
}
.btn--blue:hover { opacity: .9; transform: translateY(-1px); }

.btn--sm { padding: 7px 16px; font-size: 13px; }
.btn--lg { padding: 14px 32px; font-size: 16px; }
.btn--full { width: 100%; justify-content: center; }

/* ── HEADER ───────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}
.logo__icon { font-size: 20px; }
.logo__accent { color: var(--accent); }

.nav { display: flex; gap: 4px; flex: 1; }
.nav__link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text2);
  transition: var(--transition);
}
.nav__link:hover, .nav__link.active { color: var(--text); background: var(--bg3); }

.header__actions { display: flex; gap: 10px; margin-left: auto; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,166,35,.12) 0%, transparent 70%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero__sub {
  font-size: 18px;
  color: var(--text2);
  margin-bottom: 32px;
}
.hero__search {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
}
.search-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  color: var(--text);
  font-size: 15px;
  transition: var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg4);
}
.search-input::placeholder { color: var(--text3); }

.hero__stats { display: flex; gap: 40px; }
.stat__num { display: block; font-size: 26px; font-weight: 800; color: var(--accent); }
.stat__label { font-size: 13px; color: var(--text2); }

.hero__visual {
  position: relative;
  height: 320px;
}
.hero__card-float {
  position: absolute;
  animation: float 4s ease-in-out infinite;
}
.card-float--1 { top: 20px; right: 40px; animation-delay: 0s; }
.card-float--2 { top: 120px; right: 160px; animation-delay: 1.3s; }
.card-float--3 { top: 220px; right: 60px; animation-delay: 2.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.mini-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  min-width: 180px;
  box-shadow: var(--shadow);
}
.mini-card__game { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.mini-card__title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.mini-card__price { font-size: 18px; font-weight: 800; color: var(--green); }

/* ── SECTIONS ─────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section--alt { background: var(--bg2); }
.section__title { font-size: 26px; font-weight: 700; margin-bottom: 28px; }
.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section__header .section__title { margin-bottom: 0; }

/* ── CATEGORIES ───────────────────────────────────────────── */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.category-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245,166,35,.15);
}
.category-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 10px;
}
.category-card__name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.category-card__count { font-size: 11px; color: var(--text3); }

/* ── LOTS GRID ────────────────────────────────────────────── */
.lots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lot-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.lot-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.lot-card__header {
  padding: 16px 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lot-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lot-card__seller { font-size: 13px; font-weight: 600; }
.lot-card__rating { font-size: 12px; color: var(--accent); }
.lot-card__online {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.lot-card__body { padding: 12px 16px; }
.lot-card__game {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.lot-card__title { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.lot-card__desc { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.lot-card__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lot-card__price { font-size: 20px; font-weight: 800; color: var(--green); }
.lot-card__orders { font-size: 12px; color: var(--text3); }

/* ── STEPS ────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.step {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  position: relative;
}
.step__num {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #0f1117;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step__icon { font-size: 36px; margin-bottom: 12px; }
.step__title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.step__text { font-size: 13px; color: var(--text2); }
.step__arrow { font-size: 24px; color: var(--text3); flex-shrink: 0; }

/* ── SELLERS ──────────────────────────────────────────────── */
.sellers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.seller-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
}
.seller-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.seller-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  border: 2px solid var(--border);
}
.seller-card__name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.seller-card__rating { color: var(--accent); font-size: 14px; margin-bottom: 4px; }
.seller-card__deals { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.seller-card__badge {
  display: inline-block;
  background: rgba(245,166,35,.15);
  color: var(--accent);
  border: 1px solid rgba(245,166,35,.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 40px;
}
.footer__desc { font-size: 14px; color: var(--text2); margin-top: 12px; max-width: 240px; }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer__col h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.footer__col a {
  display: block;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
  transition: var(--transition);
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 13px;
  color: var(--text3);
}

/* ── LOT TABLE (FunPay style) ─────────────────────────────── */
.lot-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.lot-table__head {
  display: grid;
  grid-template-columns: 1fr 220px 120px;
  padding: 10px 16px;
  background: var(--bg3);
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.lot-row {
  display: grid;
  grid-template-columns: 1fr 220px 120px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  transition: background var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.lot-row:hover { background: var(--bg3); }
.lot-row--boosted { border-left: 3px solid var(--accent); }
.lot-row__boost-icon { margin-right: 6px; }
.lot-row__name {
  font-size: 14px;
  font-weight: 500;
  padding-right: 16px;
  line-height: 1.4;
}
.lot-row__seller {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lot-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.lot-row__seller-name { font-size: 13px; font-weight: 600; }
.lot-row__seller-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.lot-row__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.lot-table__col-name  {}
.lot-table__col-seller { text-align: left; }
.lot-table__col-price  { text-align: right; }

/* ── LOT BOOST ────────────────────────────────────────────── */
.lot-card--boosted {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(245,166,35,.25);
}
.lot-card__boost-badge {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0f1117;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.boost-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.boost-btn:hover { border-color: var(--accent); background: rgba(245,166,35,.1); }

/* ── BADGE / TAG ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge--green { background: rgba(46,204,113,.15); color: var(--green); }
.badge--red   { background: rgba(231,76,60,.15);  color: var(--red); }
.badge--blue  { background: rgba(74,158,255,.15); color: var(--blue); }
.badge--gold  { background: rgba(245,166,35,.15); color: var(--accent); }

/* ── HEADER SEARCH ───────────────────────────────────────── */
.header__search { flex: 1; max-width: 320px; }
.header-search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
}
.header-search-input:focus { outline: none; border-color: var(--accent); }
.header-search-input::placeholder { color: var(--text3); }

/* ── USER MENU ────────────────────────────────────────────── */
.user-menu { position: relative; }
.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.user-menu__trigger:hover { border-color: var(--accent); }
.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0f1117;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}
.user-menu__dropdown.open { display: block; }
.user-menu__dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text2);
  transition: var(--transition);
}
.user-menu__dropdown a:hover { background: var(--bg3); color: var(--text); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

.btn--notify { position: relative; }
.notify-badge {
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── FLASH MESSAGES ───────────────────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.flash--success { background: rgba(46,204,113,.15); border: 1px solid rgba(46,204,113,.3); color: var(--green); }
.flash--error   { background: rgba(231,76,60,.15);  border: 1px solid rgba(231,76,60,.3);  color: var(--red); }
.flash--info    { background: rgba(74,158,255,.15); border: 1px solid rgba(74,158,255,.3); color: var(--blue); }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }

/* ── DATA TABLE ───────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg3); }

/* ── FORM CARD ────────────────────────────────────────────── */
.form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.form-card__title { font-size: 16px; font-weight: 700; margin-bottom: 20px; }

/* ── LOT FORM ─────────────────────────────────────────────── */
.lot-form .form-card { margin-bottom: 20px; }

/* ── REVIEW ───────────────────────────────────────────────── */
.review-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.review-item__header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.review-item__user { font-weight: 600; font-size: 14px; }
.review-item__date { font-size: 12px; color: var(--text3); margin-left: auto; }
.review-item__text { font-size: 14px; color: var(--text2); }

/* ── LOT GUARANTEE ────────────────────────────────────────── */
.lot-guarantee {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

/* ── ADMIN ────────────────────────────────────────────────── */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
}
.admin-sidebar__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 0 8px;
  margin-bottom: 12px;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav__link {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text2);
  transition: var(--transition);
}
.admin-nav__link:hover, .admin-nav__link.active { background: var(--bg3); color: var(--text); }
.admin-nav__divider { height: 1px; background: var(--border); margin: 8px 0; }
.admin-content { flex: 1; padding: 32px; overflow-x: auto; }
.admin-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.admin-section-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.admin-stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.admin-stat-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.admin-stat-card__num { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.admin-stat-card__label { font-size: 13px; color: var(--text2); }
.admin-stat-card__sub { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ── MY LOTS TABLE ────────────────────────────────────────── */
.my-lots-table { overflow-x: auto; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 640px) {
  .nav, .header__actions { display: none; }
  .burger { display: flex; }
  .hero { padding: 40px 0; }
  .hero__stats { gap: 20px; }
  .steps { flex-direction: column; }
  .step__arrow { transform: rotate(90deg); }
  .footer__links { grid-template-columns: 1fr 1fr; }
}
