@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0f1a;
  --bg2: #0d1525;
  --bg3: #111c30;
  --bg4: #162040;
  --nav: #0d1525;
  --card: #0f1e35;
  --card2: #132442;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #e8edf5;
  --text2: #8fa3c0;
  --text3: #5a7394;
  --accent: #0e9f6e;
  --accent2: #0bb865;
  --accent-glow: rgba(14,159,110,0.2);
  --blue: #1a6fc4;
  --blue2: #2080d4;
  --blue-light: #4dabf7;
  --highlight: #1e3a5f;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ── NAV ─────────────────────────────────────────────────── */
.navbar {
  background: var(--nav);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--text3); font-size: 0.65rem; font-weight: 400; display: block; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.nav-link:hover { background: var(--bg3); color: var(--text); }
.nav-link.active { background: var(--blue); color: #fff; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.user-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.845rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-discord:hover { background: #4752c4; }

/* ── ANNOUNCEMENT BAR ────────────────────────────────────── */
.ann-bar {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  font-size: 0.845rem;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  font-weight: 500;
}
.ann-bar a { font-weight: 700; text-decoration: underline; }
.ann-close { position: absolute; right: 16px; background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.6; padding: 0; line-height: 1; top: 50%; transform: translateY(-50%); }
.ann-close:hover { opacity: 1; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.845rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue2); }
.btn-ghost { background: var(--bg3); color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--bg4); color: var(--text); }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-outline:hover { background: var(--bg3); color: var(--text); }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; border-radius: 8px; }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

/* ── HOME PAGE ───────────────────────────────────────────── */
.home-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }

.home-hero { margin-bottom: 28px; }
.home-hero h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.home-hero p { color: var(--text2); font-size: 0.875rem; }

/* Featured grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 360px;
  gap: 16px;
  margin-bottom: 28px;
  align-items: start;
}
.featured-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.featured-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.featured-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg4);
  position: relative;
  overflow: hidden;
}
.featured-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-card-img .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text3); background: var(--bg4); }
.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.featured-card-body { padding: 14px 16px; }
.featured-card-vendor { font-size: 0.72rem; color: var(--text3); margin-bottom: 3px; }
.featured-card-name { font-size: 1rem; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.featured-card-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.5; }
.featured-card-arrow { float: right; color: var(--text3); margin-top: 2px; }

/* Updates feed */
.updates-feed { display: flex; flex-direction: column; gap: 1px; }
.update-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}
.update-item:hover { border-color: var(--border2); }
.update-item h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 5px; }
.update-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.update-meta span { font-size: 0.72rem; color: var(--text3); display: flex; align-items: center; gap: 4px; }
.update-item p { font-size: 0.78rem; color: var(--text2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── STORE PAGE ──────────────────────────────────────────── */
.store-wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.store-actions { display: flex; gap: 12px; margin-bottom: 24px; }
.store-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.store-action-btn:hover { background: var(--blue2); }
.store-action-btn.ghost { background: var(--bg3); color: var(--text2); border: 1px solid var(--border2); }
.store-action-btn.ghost:hover { background: var(--bg4); color: var(--text); }

.store-section-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; color: var(--text2); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.product-card:hover { border-color: var(--border2); }
.product-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg4);
  position: relative;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-img .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text3); }
.product-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.product-card-vendor { font-size: 0.68rem; color: var(--text3); margin-bottom: 2px; }
.product-card-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.product-card-desc { font-size: 0.77rem; color: var(--text2); line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.product-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.product-card-meta .ic { font-size: 0.72rem; color: var(--text3); display: flex; align-items: center; gap: 3px; }
.product-card-footer { margin-top: auto; }
.btn-download-card {
  width: 100%;
  padding: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-download-card:hover { background: var(--accent2); }
.btn-owned {
  width: 100%;
  padding: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-owned:hover { background: var(--accent2); }
.btn-buy {
  width: 100%;
  padding: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-buy:hover { background: var(--blue2); }
.btn-locked {
  width: 100%;
  padding: 8px;
  background: var(--bg4);
  color: var(--text3);
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: default;
}

/* ── MY PRODUCTS PAGE ────────────────────────────────────── */
.myproducts-wrap { max-width: 900px; margin: 0 auto; padding: 28px 24px; }
.myproducts-list { display: flex; flex-direction: column; gap: 2px; }
.myproduct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 16px;
  transition: border-color 0.15s;
  margin-bottom: 4px;
}
.myproduct-row:hover { border-color: var(--border2); }
.myproduct-info { flex: 1; min-width: 0; }
.myproduct-name { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.myproduct-sub { font-size: 0.775rem; color: var(--text3); }
.myproduct-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-manage {
  padding: 7px 16px;
  background: var(--bg4);
  color: var(--text2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-manage:hover { background: var(--highlight); color: var(--text); }
.btn-dl {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-dl:hover { background: var(--accent2); }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  transform: translateY(8px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.modal-header h3 { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1.1rem; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-sub { font-size: 0.78rem; color: var(--text3); margin-bottom: 18px; }
.modal-dl-list { display: flex; flex-direction: column; gap: 2px; }
.modal-dl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: 6px;
  gap: 12px;
  margin-bottom: 4px;
}
.modal-dl-item .dl-info { flex: 1; }
.modal-dl-item .dl-type { font-size: 0.68rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1px; }
.modal-dl-item .dl-name { font-size: 0.845rem; font-weight: 600; color: var(--text); }
.modal-dl-btn {
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.modal-dl-btn:hover { background: var(--accent2); }

/* ── LOADING / EMPTY ─────────────────────────────────────── */
.loading-wrap { display: flex; align-items: center; justify-content: center; padding: 60px; gap: 12px; color: var(--text3); font-size: 0.875rem; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border2); border-top-color: var(--text2); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 24px; color: var(--text3); }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--text2); }

/* ── PAGE TABS ───────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text3);
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--blue-light); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ── HERO (landing) ──────────────────────────────────────── */
.landing-hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 680px;
  margin: 0 auto;
}
.landing-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.77rem;
  color: var(--text2);
  margin-bottom: 20px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.landing-hero h1 { font-size: 2.6rem; font-weight: 700; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.02em; }
.landing-hero h1 em { font-style: normal; color: var(--blue-light); }
.landing-hero p { font-size: 1rem; color: var(--text2); margin-bottom: 32px; line-height: 1.7; }
.landing-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── LANDING PRODUCTS PREVIEW ────────────────────────────── */
.landing-products { max-width: 1100px; margin: 0 auto; padding: 0 24px 60px; }
.landing-products h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.landing-features { max-width: 900px; margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.feature-icon { font-size: 1.5rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 0.8rem; color: var(--text2); line-height: 1.6; }

/* ── MAINTENANCE ─────────────────────────────────────────── */
.maint-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; gap: 12px; }
.maint-page h1 { font-size: 2rem; font-weight: 700; margin-bottom: 6px; }
.maint-page p { color: var(--text2); max-width: 440px; line-height: 1.7; }
.maint-eta { font-size: 0.845rem; color: var(--text3); }

/* ── TRANSFER SECTION ────────────────────────────────────── */
.transfer-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.transfer-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.transfer-card p { font-size: 0.8rem; color: var(--text2); margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-col { margin-bottom: 12px; }
.form-col label, .form-row label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 5px; }
.form-col input, .form-row input, .form-col select, .form-row select { width: 100%; padding: 8px 11px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 6px; color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.845rem; outline: none; transition: border-color 0.15s; }
.form-col input:focus, .form-row input:focus, .form-col select:focus { border-color: var(--blue-light); }
select option { background: var(--bg3); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 16px; border-radius: 7px; font-size: 0.835rem; font-weight: 500; background: var(--card2); border: 1px solid var(--border2); color: var(--text); box-shadow: var(--shadow); animation: slideUp 0.2s ease; max-width: 300px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .featured-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .landing-features { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .navbar { padding: 0 16px; }
  .nav-logo span { display: none; }
}
@media (max-width: 520px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ── LOGIN SPLIT PAGE ────────────────────────────────────── */
.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-left {
  position: relative;
  background: #0a0f1a center/cover no-repeat;
  min-height: 100vh;
  overflow: hidden;
}

.login-left-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,15,26,0.1) 0%,
    rgba(10,15,26,0.5) 100%
  );
  backdrop-filter: blur(1px);
}

.login-right {
  background: #050a12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  min-height: 100vh;
}

.login-box {
  max-width: 380px;
  width: 100%;
}

.login-greeting {
  font-size: 2.2rem;
  margin-bottom: 10px;
  line-height: 1;
}

.login-box h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-box p {
  font-size: 1rem;
  color: #7a9ab8;
  margin-bottom: 32px;
  line-height: 1.5;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: #0e2a4a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.login-btn:hover {
  background: #122f52;
  border-color: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
  .login-split {
    grid-template-columns: 1fr;
  }
  .login-left {
    min-height: 40vh;
  }
}