/* CSS Reset & Variables */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a10;
  --bg-primary: #0a0a10;
  --bg-surface: #13131e;
  --bg-surface2: #16161f;
  --bg-surface3: #1e1e2e;
  --surface: #13131e;
  --surface2: #16161f;
  --surface3: #1e1e2e;
  --bg-footer: #08080d;
  --text: #f0f0f8;
  --text-primary: #f0f0f8;
  --text-secondary: #a0a0b0;
  --text2: #a0a0b0;
  --text-muted: #64748b;
  --muted: #64748b;
  --accent: #64748b;
  --accent-h: #475569;
  --accent-hover: #475569;
  --accent-dim: rgba(100, 116, 139, 0.12);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border2: rgba(255, 255, 255, 0.12);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.08);
  --green-border: rgba(34, 197, 94, 0.2);
  --red: #ef4444;
  --red-bg: #1a0a0a;
  --red-border: rgba(239, 68, 68, 0.2);
  --gold: #f59e0b;
}
html.light-mode {
  --bg: #f5f5fa;
  --bg-primary: #f5f5fa;
  --bg-surface: #ffffff;
  --bg-surface2: #f0f0f5;
  --bg-surface3: #e8e8f0;
  --surface: #ffffff;
  --surface2: #f0f0f5;
  --surface3: #e8e8f0;
  --bg-footer: #eaeaf0;
  --text: #1a1a2e;
  --text-primary: #1a1a2e;
  --text-secondary: #555570;
  --text2: #555570;
  --text-muted: #64748b;
  --muted: #64748b;
  --accent: #64748b;
  --accent-h: #475569;
  --accent-hover: #475569;
  --accent-dim: rgba(100, 116, 139, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --border2: rgba(0, 0, 0, 0.12);
  --green: #16a34a;
  --green-bg: rgba(34, 197, 94, 0.08);
  --green-border: rgba(34, 197, 94, 0.2);
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: rgba(239, 68, 68, 0.2);
  --gold: #d97706;
}
body { background: var(--bg-primary); color: var(--text-primary); font-family: 'DM Sans', sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
.inner { max-width: 1400px; margin: 0 auto; padding: 0 48px; }
.page-content { flex: 1; }

/* Utility */
a { text-decoration: none; color: inherit; }
.d-none { display: none !important; }

/* Header */
.ggv-header { background: var(--bg-surface); border-bottom: 0.5px solid var(--border); position: relative; z-index: 400; }
.header-logo-bar { display: flex; align-items: center; justify-content: center; padding: 16px 48px 12px; position: relative; max-width: 1400px; margin: 0 auto; }
.ggv-logo { display: flex; align-items: center; gap: 10px; user-select: none; }
.logo-mark { width: 42px; height: 42px; background: var(--accent-dim); border: 1.5px solid rgba(100,116,139,0.4); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.logo-mark svg { width: 24px; height: 24px; }
.logo-wordmark { display: flex; flex-direction: column; line-height: 1; }
.logo-good { font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.logo-game-vault { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.5px; line-height: 1.1; }
.logo-game-vault span { color: #94a3b8; }

.header-nav-bar { border-top: 0.5px solid var(--border); max-width: 1400px; margin: 0 auto; padding: 0 48px; display: flex; align-items: center; gap: 0; }
.nav-links { display: flex; align-items: center; flex: 1; gap: 2px; }
.nav-link { font-size: 13px; color: var(--text-secondary); padding: 11px 14px; cursor: pointer; transition: color 0.15s; white-space: nowrap; position: relative; user-select: none; display: flex; align-items: center; gap: 4px; border-bottom: 2px solid transparent; }
.nav-link:hover { color: #94a3b8; border-bottom-color: var(--accent); }
.nav-link.active { color: #94a3b8; border-bottom-color: var(--accent); }
.nav-chevron { font-size: 10px; opacity: 0.5; transition: transform 0.15s; }
.nav-link.open .nav-chevron { transform: rotate(180deg); }

.browse-dropdown { position: absolute; top: calc(100% + 1px); left: 0; background: var(--bg-surface); border: 0.5px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; padding: 8px; min-width: 220px; display: none; z-index: 500; }
.browse-dropdown.open { display: block; }
.dropdown-item { font-size: 13px; color: var(--text-secondary); padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: space-between; text-decoration: none; }
.dropdown-item:hover { background: var(--bg-surface3); color: var(--text-primary); }
.dropdown-count { font-size: 11px; color: var(--text-muted); }
.dropdown-divider { height: 0.5px; background: var(--border); margin: 6px 0; }

.nav-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-divider { width: 0.5px; height: 18px; background: var(--border); margin: 0 8px; }

.search-wrap { position: relative; display: flex; align-items: center; }
.search-btn { width: 34px; height: 34px; border-radius: 8px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.search-btn:hover { color: var(--text-primary); background: var(--bg-surface2); }
.search-expanded { display: none; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 280px; background: var(--bg-surface2); border: 0.5px solid var(--border-hover); border-radius: 8px; overflow: hidden; z-index: 200; }
.search-expanded.open { display: flex; align-items: center; }
.search-input { flex: 1; background: transparent; border: none; outline: none; font-size: 13px; color: var(--text-primary); padding: 9px 12px; font-family: 'DM Sans', sans-serif; }
.search-input::placeholder { color: var(--text-muted); }
.search-close { padding: 0 10px; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; background: none; border: none; }
.search-close:hover { color: var(--text-primary); }
.search-results-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 360px; background: var(--bg-surface); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; display: none; z-index: 300; box-shadow: 0 8px 32px rgba(0,0,0,0.4); animation: suggestFadeIn 0.12s ease; }
.search-results-dropdown.open { display: block; }
@keyframes suggestFadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; border-bottom: 0.5px solid var(--border); transition: background 0.1s; text-decoration: none; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-surface2); }
.search-result-art { width: 56px; height: 36px; background: #0d0d1a; border-radius: 5px; flex-shrink: 0; overflow: hidden; }
.search-result-art img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 13px; color: var(--text-primary); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.search-result-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.search-result-platform { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; background: rgba(255,255,255,0.05); border-radius: 3px; padding: 1px 5px; }
.search-result-price { font-size: 12px; font-weight: 600; color: #94a3b8; white-space: nowrap; }
.search-see-all { display: flex; align-items: center; justify-content: center; padding: 10px; font-size: 12px; color: #94a3b8; cursor: pointer; border-top: 0.5px solid var(--border); background: var(--bg-surface2); text-decoration: none; gap: 4px; }
.search-see-all:hover { color: var(--text-primary); background: var(--bg-surface3); }

.cart-btn { width: 34px; height: 34px; border-radius: 8px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; position: relative; }
.cart-btn:hover { color: var(--text-primary); background: var(--bg-surface2); }
.cart-badge { position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; background: var(--accent); border-radius: 50%; font-size: 9px; font-weight: 500; color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'DM Sans', sans-serif; }

/* theme toggle */
.theme-btn { width: 34px; height: 34px; border-radius: 8px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.theme-btn:hover { color: var(--text-primary); background: var(--bg-surface2); }

.login-btn { font-size: 13px; font-weight: 500; color: var(--text-primary); background: var(--accent-dim); border: 0.5px solid rgba(100,116,139,0.3); border-radius: 8px; padding: 7px 14px; cursor: pointer; transition: all 0.15s; white-space: nowrap; font-family: 'DM Sans', sans-serif; display: inline-block; }
.login-btn:hover { background: rgba(100,116,139,0.2); border-color: rgba(100,116,139,0.5); }

.avatar-btn { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 8px; border: 0.5px solid var(--border); background: transparent; cursor: pointer; transition: all 0.15s; position: relative; }
.avatar-btn:hover { background: var(--bg-surface2); border-color: var(--border-hover); }
.avatar-circle { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-dim); border: 1px solid rgba(100,116,139,0.3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; color: #94a3b8; font-family: 'DM Sans', sans-serif; text-transform: uppercase; }
.avatar-name { font-size: 12px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; }
.avatar-chevron { font-size: 10px; color: var(--text-muted); }
.avatar-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-surface); border: 0.5px solid var(--border); border-radius: 10px; padding: 6px; min-width: 180px; display: none; z-index: 300; }
.avatar-dropdown.open { display: block; }
.avatar-dd-item { font-size: 13px; color: var(--text-secondary); padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.avatar-dd-item:hover { background: var(--bg-surface3); color: var(--text-primary); }
.avatar-dd-divider { height: 0.5px; background: var(--border); margin: 4px 0; }
.avatar-dd-item.logout { color: #f87171; }
.avatar-dd-item.logout:hover { background: rgba(239,68,68,0.08); color: #fca5a5; }

/* Footer */
.ggv-footer { background: var(--bg-footer); border-top: 0.5px solid var(--border); width: 100%; margin-top: auto; }
.footer-main { max-width: 1400px; margin: 0 auto; padding: 48px 48px 40px; display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.footer-logo-mark { width: 52px; height: 52px; background: var(--accent-dim); border: 1.5px solid rgba(100,116,139,0.35); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer-logo-mark svg { width: 28px; height: 28px; }
.footer-logo-wordmark { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.footer-logo-good { font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.footer-logo-gamevault { font-family: 'Rajdhani', sans-serif; font-size: 26px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.5px; }
.footer-logo-gamevault span { color: #94a3b8; }
.footer-tagline { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 220px; }
.footer-socials { display: flex; gap: 8px; }
.social-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 0.5px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s; color: var(--text-muted); text-decoration: none; }
.social-icon:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); color: var(--text-primary); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col-title { font-size: 11px; font-weight: 500; color: var(--text-primary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.footer-col-divider { height: 1px; background: var(--accent); width: 24px; margin-bottom: 14px; margin-top: -10px; }
.footer-link { display: block; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; transition: color 0.15s; cursor: pointer; }
.footer-link:last-child { margin-bottom: 0; }
.footer-link:hover { color: var(--text-primary); }
.footer-bottom { border-top: 0.5px solid var(--border); max-width: 1400px; margin: 0 auto; padding: 20px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-copyright { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.footer-payments { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.footer-pay-label { font-size: 11px; color: var(--text-muted); margin-right: 4px; white-space: nowrap; }
.pay-icon { height: 22px; padding: 3px 6px; background: rgba(255,255,255,0.06); border: 0.5px solid rgba(255,255,255,0.1); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; letter-spacing: 0.3px; }

/* Global Form Elements */
input, select, textarea { font-family: 'DM Sans', sans-serif; }
button { font-family: 'DM Sans', sans-serif; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; font-weight: 500; }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-success { background: rgba(34, 197, 94, 0.1); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.2); }

/* Buttons */
.btn-primary { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 12px 24px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-primary:hover { background: var(--accent-h); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 12px 24px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }

/* Auth Layout */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 40px 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.auth-title { font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px; text-align: center; }
.auth-sub { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 32px; }
.auth-field { margin-bottom: 20px; }
.auth-label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 8px; font-weight: 500; }
.auth-input { width: 100%; background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--text); transition: border-color 0.15s; }
.auth-input:focus { border-color: var(--accent); outline: none; }
.auth-btn { width: 100%; margin-top: 10px; }
.auth-link { font-size: 13px; color: #94a3b8; text-decoration: none; display: block; text-align: center; margin-top: 24px; }
.auth-link:hover { color: var(--text); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 40px 0; }
.page-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text2); font-size: 14px; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.page-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border-hover); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-ellipsis { color: var(--muted); padding: 0 4px; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 380px;
  background: #13131f;
  border: 1px solid rgba(100,116,139,0.2);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 0.5px rgba(100,116,139,0.1);
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}
.toast.toast-show {
  transform: translateX(0);
  opacity: 1;
}
.toast.toast-hide {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.toast-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.toast-success .toast-icon { background: rgba(34,197,94,0.12); }
.toast-error   .toast-icon { background: rgba(239,68,68,0.12); }
.toast-info    .toast-icon { background: rgba(100,116,139,0.12); }
.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-size: 13px; font-weight: 600;
  color: #e8e8f0; margin-bottom: 2px;
  font-family: 'DM Sans', sans-serif;
}
.toast-msg {
  font-size: 12px; color: #8888aa;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast-close {
  background: none; border: none; color: #555577;
  cursor: pointer; font-size: 16px; line-height: 1;
  padding: 0 0 0 4px; flex-shrink: 0; align-self: flex-start;
  transition: color 0.15s;
}
.toast-close:hover { color: #aaaacc; }
.toast-progress {
  position: absolute; bottom: 0; left: 0;
  height: 2px; border-radius: 0 0 14px 14px;
  background: var(--accent);
  animation: toastProgress 3s linear forwards;
}
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }
