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

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --card: #16161f;
  --card-hover: #1e1e2a;
  --border: #2a2a3a;
  --blue: #0070f3;
  --blue-light: #3b9eff;
  --blue-dark: #0050b3;
  --accent: #00d4ff;
  --purple: #7c3aed;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --text: #e8e8f0;
  --text2: #9999b5;
  --text3: #666680;
  --ps-blue: #003087;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, select, button { font-family: inherit; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,112,243,.4); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.w-full { width: 100%; justify-content: center; }

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.logo-accent { color: var(--blue); }
.nav-links { display: flex; gap: 1.75rem; margin: 0 auto; }
.nav-links a { color: var(--text2); font-weight: 500; font-size: .9rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; gap: .75rem; flex-shrink: 0; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; padding: 1rem 1.5rem; gap: .75rem; border-top: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text2); font-size: 1rem; font-weight: 500; padding: .4rem 0; }

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

/* ── SECTION ── */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; position: relative; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.section-header p { color: var(--text2); font-size: 1.05rem; }
.see-all { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--blue); font-weight: 600; font-size: .9rem; }
.see-all:hover { text-decoration: underline; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 1.5rem;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 80% 60% at 60% 30%, rgba(0,112,243,.12), transparent),
              radial-gradient(ellipse 50% 50% at 20% 80%, rgba(124,58,237,.08), transparent);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { flex: 1; max-width: 560px; }
.hero-badge {
  display: inline-block;
  background: rgba(0,112,243,.15);
  border: 1px solid rgba(0,112,243,.3);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.25rem; }
.gradient-text {
  background: linear-gradient(135deg, var(--blue-light), var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { color: var(--text2); font-size: 1.1rem; line-height: 1.7; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }

/* ── HERO VISUAL ── */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.controller-card {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,112,243,.15) 0%, rgba(0,0,0,0) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ps-logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: .1em;
  margin-bottom: 1.5rem;
}
.game-cards-stack { display: flex; flex-direction: column; gap: .75rem; }
.game-card-mini {
  width: 220px;
  padding: .85rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  border: 1px solid rgba(255,255,255,.08);
  animation: float calc(3s + var(--i) * 0.5s) ease-in-out infinite alternate;
}
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* ── HOW IT WORKS ── */
.how-it-works { background: var(--bg2); }
.steps { display: flex; align-items: center; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  width: 260px;
  text-align: center;
  position: relative;
  transition: transform .2s, border-color .2s;
}
.step:hover { transform: translateY(-4px); border-color: var(--blue); }
.step-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.step-num {
  position: absolute;
  top: 1rem; right: 1.25rem;
  font-size: .7rem;
  font-weight: 800;
  color: var(--text3);
  letter-spacing: .08em;
}
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.step p { color: var(--text2); font-size: .9rem; }
.step-arrow { font-size: 1.5rem; color: var(--text3); flex-shrink: 0; }

/* ── GAME CARDS ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(0,112,243,.4); box-shadow: 0 8px 32px rgba(0,112,243,.15); }
.game-card-img {
  height: 140px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.game-emoji { font-size: 4rem; }
.game-platform-tag {
  position: absolute;
  top: .6rem; right: .6rem;
  background: var(--blue);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
  letter-spacing: .04em;
}
.game-card-body { padding: 1rem; }
.game-title { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.3; }
.game-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.genre-tag {
  background: rgba(255,255,255,.07);
  color: var(--text2);
  font-size: .7rem;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.game-price-row { display: flex; align-items: center; justify-content: space-between; }
.game-price { font-size: 1.15rem; font-weight: 800; color: var(--accent); }

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-like-new { background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.badge-good { background: rgba(59,154,255,.15); color: #3b9eff; border: 1px solid rgba(59,154,255,.3); }
.badge-fair { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }

/* ── WHY US ── */
.why-us { background: var(--bg2); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color .2s;
}
.feature-card:hover { border-color: rgba(0,112,243,.3); }
.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.feature-card p { color: var(--text2); font-size: .9rem; }

/* ── CTA ── */
.cta-section {
  background: linear-gradient(135deg, rgba(0,112,243,.15), rgba(124,58,237,.1));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.5rem;
  text-align: center;
}
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: .75rem; }
.cta-section p { color: var(--text2); font-size: 1.05rem; margin-bottom: 2rem; }

/* ── FOOTER ── */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text2); font-size: .9rem; margin-top: .75rem; line-height: 1.6; }
.footer-links h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 1rem; }
.footer-links ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-links li, .footer-links a { color: var(--text2); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; color: var(--text3); font-size: .85rem; }
.footer-bottom a { color: var(--blue); }

/* ── PAGE HEADER ── */
.page-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem;
}
.page-header .container { display: flex; flex-direction: column; gap: .4rem; }
.page-header h1 { font-size: 2.25rem; font-weight: 900; }
.page-header p { color: var(--text2); font-size: 1.05rem; }

/* ── FILTERS BAR ── */
.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 1rem;
  gap: .6rem;
}
.search-box:focus-within { border-color: var(--blue); }
.search-icon { font-size: 1rem; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .95rem;
  padding: .75rem 0;
}
.search-box input::placeholder { color: var(--text3); }
.filter-group { display: flex; gap: .75rem; flex-wrap: wrap; }
.filter-group select {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .6rem 1rem;
  font-size: .875rem;
  cursor: pointer;
  outline: none;
}
.filter-group select:focus { border-color: var(--blue); }

.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .75rem;
  color: var(--text2);
  font-size: .9rem;
}
.condition-legend { display: flex; gap: .5rem; }

.empty-state { text-align: center; padding: 5rem 0; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.empty-state p { color: var(--text2); }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--bg3);
  border: none;
  color: var(--text2);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-game { display: flex; gap: 2rem; }
.modal-img {
  width: 160px; height: 160px;
  background: var(--bg3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-info { flex: 1; }
.modal-info h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: .75rem; }
.modal-price { font-size: 2rem; font-weight: 900; color: var(--accent); margin-bottom: .75rem; }
.modal-sell-info {
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.2);
  color: #10b981;
  border-radius: 8px;
  padding: .6rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}
.modal-features { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.5rem; }
.modal-features li { color: var(--text2); font-size: .875rem; }

/* ── CART TOAST ── */
.cart-toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--green);
  color: #fff;
  padding: .85rem 1.75rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  z-index: 9999;
  transition: transform .3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(16,185,129,.4);
}
.cart-toast.show { transform: translateX(-50%) translateY(0); }

/* ── SELL PAGE ── */
.sell-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.sell-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.sell-form-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: .4rem; }
.step-desc { color: var(--text2); font-size: .9rem; margin-bottom: 1.5rem; }

/* Sell step indicator */
.sell-steps-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
  gap: 0;
}
.sell-step {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text3);
}
.sell-step.active { color: var(--text); }
.sell-step.done { color: var(--green); }
.sell-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}
.sell-step.active .sell-step-num { background: var(--blue); border-color: var(--blue); color: #fff; }
.sell-step.done .sell-step-num { background: var(--green); border-color: var(--green); color: #fff; }
.sell-step-line { flex: 1; height: 2px; background: var(--border); min-width: 2rem; }

/* Sell search */
.sell-search-box {
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 1rem;
  gap: .6rem;
  margin-bottom: 0;
}
.sell-search-box:focus-within { border-color: var(--blue); }
.sell-search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .95rem;
  padding: .85rem 0;
}
.sell-search-box input::placeholder { color: var(--text3); }
.sell-search-results {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  margin-top: -2px;
}
.sell-result-item {
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.sell-result-item:last-child { border-bottom: none; }
.sell-result-item:hover { background: var(--card); color: var(--text); }

.selected-game-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0,112,243,.08);
  border: 1px solid rgba(0,112,243,.2);
  border-radius: 10px;
  padding: 1rem;
  margin-top: .75rem;
}
.sg-icon { font-size: 2rem; }
.sg-title { font-weight: 700; font-size: 1rem; }
.sg-sub { font-size: .8rem; color: var(--text3); }
.sg-remove { margin-left: auto; background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1rem; }
.sg-remove:hover { color: var(--red); }

.sell-platform-select { margin-top: 1.25rem; }
.sell-platform-select label { font-size: .85rem; font-weight: 600; color: var(--text2); margin-bottom: .6rem; display: block; }
.platform-btns { display: flex; gap: .75rem; }
.platform-btn {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text2);
  padding: .65rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s;
}
.platform-btn:hover { border-color: var(--blue); color: var(--text); }
.platform-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Condition cards */
.condition-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.condition-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}
.condition-card:hover { border-color: var(--blue); }
.condition-card.selected { border-color: var(--blue); background: rgba(0,112,243,.08); }
.condition-icon { font-size: 1.75rem; margin-bottom: .5rem; }
.condition-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: .25rem; }
.condition-card p { font-size: .78rem; color: var(--text3); }
.condition-multiplier { font-size: .7rem; font-weight: 700; color: var(--green); margin-top: .4rem; }

/* Price quote box */
.price-quote {
  background: linear-gradient(135deg, rgba(0,212,255,.08), rgba(0,112,243,.08));
  border: 1px solid rgba(0,212,255,.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.quote-label { font-size: .8rem; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }
.quote-price { font-size: 3rem; font-weight: 900; color: var(--accent); }
.quote-note { font-size: .8rem; color: var(--text3); margin-top: .4rem; }

/* Step nav */
.step-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text2); }
.form-group input, .form-group select {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .7rem 1rem;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus { border-color: var(--blue); }
.form-group input::placeholder { color: var(--text3); }
.radio-group { display: flex; gap: 1.5rem; }
.radio-label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text2); cursor: pointer; }

/* Summary box */
.summary-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.summary-box h4 { font-size: .9rem; font-weight: 700; margin-bottom: 1rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .875rem;
  color: var(--text2);
}
.summary-row strong { color: var(--text); }
.summary-row:last-child { border-bottom: none; }
.total-row { font-weight: 700; font-size: 1rem; color: var(--text); }
.price-highlight { color: var(--accent) !important; }

/* Sell sidebar */
.sell-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.sidebar-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 1rem; }
.sidebar-list { display: flex; flex-direction: column; gap: .6rem; }
.sidebar-list li { font-size: .875rem; color: var(--text2); }
.tips-card { background: rgba(245,158,11,.05); border-color: rgba(245,158,11,.15); }

/* Success modal */
.success-modal { text-align: center; }
.success-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-modal h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: .75rem; }
.success-modal p { color: var(--text2); margin-bottom: 1.5rem; }
.success-details { background: var(--bg3); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; text-align: left; }
.success-detail-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .875rem; color: var(--text2); }
.success-detail-row:last-child { border-bottom: none; }
.success-detail-row strong { color: var(--text); }

/* ── AUTH PAGE ── */
.auth-body { background: var(--bg); }
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}
.auth-left {
  background: linear-gradient(135deg, rgba(0,112,243,.15), rgba(124,58,237,.12));
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.auth-left-content { max-width: 400px; }
.auth-brand { font-size: 1.5rem; font-weight: 900; color: var(--blue); margin-bottom: 1.5rem; }
.auth-left h1 { font-size: 2rem; font-weight: 900; line-height: 1.2; margin-bottom: 2rem; }
.auth-perks { display: flex; flex-direction: column; gap: .85rem; }
.auth-perk { font-size: .95rem; color: var(--text2); }

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: 8px;
  padding: .25rem;
  margin-bottom: 1.5rem;
  gap: .25rem;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text3);
  padding: .6rem;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.auth-tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.3); }

.auth-subtitle { color: var(--text2); font-size: .9rem; margin-bottom: 1.5rem; }

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 8px;
  padding: .8rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  margin-bottom: 1.5rem;
}
.btn-google:hover { box-shadow: 0 4px 16px rgba(0,0,0,.3); transform: translateY(-1px); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text3);
  font-size: .8rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Phone input */
.phone-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.phone-input-wrap:focus-within { border-color: var(--blue); }
.phone-prefix {
  padding: 0 .85rem;
  color: var(--text2);
  font-size: .9rem;
  font-weight: 600;
  border-right: 1px solid var(--border);
  background: var(--bg3);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.phone-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: .75rem .9rem;
  color: var(--text);
  font-size: .95rem;
}

/* OTP boxes */
.otp-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.otp-header p { color: var(--text2); font-size: .875rem; }
.back-btn { background: none; border: none; color: var(--blue); font-size: .875rem; cursor: pointer; font-weight: 600; white-space: nowrap; }
.otp-inputs { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.otp-box {
  width: 48px; height: 52px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.otp-box:focus { border-color: var(--blue); }

.resend-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text3);
  font-size: .85rem;
  cursor: pointer;
  padding: .5rem;
  margin-top: .75rem;
  text-align: center;
}
.resend-btn:not(:disabled) { color: var(--blue); font-weight: 600; }

/* Auth messages */
.auth-message {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #ef4444;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-top: 1rem;
}
.auth-success {
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.25);
  color: #10b981;
}
.auth-terms { color: var(--text3); font-size: .78rem; text-align: center; margin-top: 1.25rem; line-height: 1.6; }
.auth-terms a { color: var(--blue); }

/* ── NAVBAR USER MENU ── */
.nav-user { position: relative; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: .35rem .75rem .35rem .35rem;
  cursor: pointer;
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  transition: border-color .2s;
}
.nav-user-btn:hover { border-color: var(--blue); }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nav-avatar-initials {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-user-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chevron { font-size: .7rem; color: var(--text3); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}
.nav-dropdown.open { display: block; }
.nav-dropdown-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .7rem 1rem;
  font-size: .875rem;
  color: var(--text2);
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-dropdown-item:hover { background: var(--bg3); color: var(--text); }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: .25rem 0; }
.nav-signout { color: #ef4444 !important; }
.nav-signout:hover { background: rgba(239,68,68,.1) !important; }

/* Verified read-only field */
.verified-field { border-color: rgba(16,185,129,.4) !important; background: rgba(16,185,129,.05) !important; }
.verified-field input { color: var(--text2); cursor: default; }

/* Profile completion card */
.profile-header { text-align: center; margin-bottom: 1.75rem; }
.profile-icon { font-size: 3rem; margin-bottom: .75rem; }
.profile-header h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: .3rem; }
.profile-header p { color: var(--text2); font-size: .9rem; }

@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-card { padding: 1.75rem; }
  .otp-box { width: 40px; height: 46px; font-size: 1.1rem; }
}

/* ── LEGAL PAGES ── */
.legal-container { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
.legal-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.legal-toc h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 1rem; }
.legal-toc ol { counter-reset: toc; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.legal-toc li { counter-increment: toc; }
.legal-toc a { font-size: .875rem; color: var(--text2); display: flex; align-items: center; gap: .5rem; }
.legal-toc a::before { content: counter(toc); font-size: .7rem; font-weight: 700; background: var(--bg3); border-radius: 4px; padding: .1rem .4rem; color: var(--text3); }
.legal-toc a:hover { color: var(--blue); }
.legal-section { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; color: var(--text); }
.legal-section h3 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 .6rem; color: var(--text); }
.legal-section p { color: var(--text2); line-height: 1.8; margin-bottom: .75rem; }
.legal-section ul, .legal-section ol { color: var(--text2); padding-left: 1.5rem; display: flex; flex-direction: column; gap: .4rem; line-height: 1.7; }
.legal-section a { color: var(--blue); }
.legal-section a:hover { text-decoration: underline; }

/* Refund info card */
.info-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 1rem 0; }
.info-row { display: flex; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .875rem; color: var(--text2); }
.info-row:last-child { border-bottom: none; }
.info-row strong { color: var(--text); }

/* Cookie table */
.cookie-table { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 1rem 0; }
.cookie-row { display: grid; grid-template-columns: 140px 1fr 100px; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .875rem; color: var(--text2); }
.cookie-row:last-child { border-bottom: none; }
.cookie-header { background: var(--bg3); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }

/* ── FAQ PAGE ── */
.faq-search-wrap { text-align: center; }
.faq-category { margin-bottom: 3rem; }
.faq-cat-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 2px solid var(--border); }
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .2s; }
.faq-item:hover { border-color: rgba(0,112,243,.3); }
.faq-item.open { border-color: var(--blue); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-icon { font-size: 1.3rem; color: var(--blue); flex-shrink: 0; font-weight: 400; }
.faq-answer { display: none; padding: 0 1.25rem 1.25rem; color: var(--text2); line-height: 1.8; font-size: .9rem; }
.faq-answer a { color: var(--blue); }
.faq-answer ul, .faq-answer ol { padding-left: 1.25rem; display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; }
.faq-item.open .faq-answer { display: block; }
.faq-cta { text-align: center; padding: 3rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-top: 2rem; }
.faq-cta h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.faq-cta p { color: var(--text2); margin-bottom: 1.5rem; }

@media (max-width: 768px) {
  .legal-container { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .cookie-row { grid-template-columns: 1fr 1fr; }
  .cookie-row span:last-child { display: none; }
}

/* ── SKELETON LOADING ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton-box {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--card-hover) 50%, var(--bg3) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-card { pointer-events: none; }
.skeleton-card .game-card-img { background: var(--bg3); }
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: .6rem;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--card-hover) 50%, var(--bg3) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w60 { width: 60%; }

/* ── API ERROR / EMPTY ── */
.api-error { text-align: center; padding: 4rem 0; }
.api-error h3 { font-size: 1.2rem; font-weight: 700; margin: .75rem 0 .4rem; }
.api-error p  { color: var(--text2); font-size: .9rem; margin-bottom: 1.25rem; }
.no-data { text-align: center; color: var(--text3); padding: 2rem; width: 100%; grid-column: 1/-1; }
.modal-loading { padding: 3rem; text-align: center; font-size: 1.1rem; color: var(--text2); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .sell-layout { grid-template-columns: 1fr; }
  .sell-sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1; min-width: 220px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: block; }
  .hero { flex-direction: column; text-align: center; min-height: auto; padding: 3rem 1.5rem; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .modal-game { flex-direction: column; }
  .modal-img { width: 100%; height: 140px; }
  .condition-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sell-form-card { padding: 1.5rem; }
  .sell-steps-indicator { display: none; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .filters-bar { flex-direction: column; }
  .search-box { width: 100%; }
  .filter-group { width: 100%; }
  .filter-group select { flex: 1; }
}
