/* NewLiveSmp Rank Shop — identity sendiri (navy + emerald, bukan clone Arqonara) */
:root {
  --bg: #070b12;
  --bg2: #0c1220;
  --panel: #101828;
  --panel2: #152036;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e8eef7;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent2: #34d399;
  --accent-dim: rgba(16, 185, 129, 0.14);
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.12), transparent),
    radial-gradient(ellipse 40% 30% at 100% 50%, rgba(56, 189, 248, 0.05), transparent);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent2); }
img, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea {
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1; width: 100%; }

/* ========== TOPBAR (rapi, 1 baris) ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  color: var(--text) !important;
  text-decoration: none !important;
  min-width: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #0d9488);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #042f2e;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}
.brand-text span {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
/* hide subtitle on very small screens */
@media (max-width: 380px) {
  .brand-text span { display: none; }
}

.nav-links {
  display: none;
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
}
.nav-links a {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.2;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Language toggle (diisi i18n.js) */
.lang-switch {
  display: none;
  flex-shrink: 0;
}
@media (min-width: 900px) {
  .lang-switch { display: block; }
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  gap: 0;
}
.lang-opt {
  padding: 0.28rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}
.lang-opt.on {
  background: var(--accent);
  color: #042f2e;
}

/* Auth area (diisi auth.js) */
#nav-auth {
  display: flex;
  align-items: center;
}
.nav-auth-guest {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-auth-guest .btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .nav-auth-guest .btn-ghost { display: none; } /* hanya Daftar di HP sempit */
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text) !important;
  max-width: 140px;
}
.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #042f2e;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.nav-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
}
.nav-user-name {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-sub {
  font-size: 0.6rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .nav-user-meta { display: none; }
  .nav-user-chip { padding: 0.15rem; border-radius: 50%; }
}
.btn-logout {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-logout:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 640px) {
  .btn-logout-text { display: none; }
  .btn-logout::after { content: '⎋'; font-size: 0.85rem; }
}

.nav-toggle {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}
@media (min-width: 900px) {
  .nav-toggle { display: none !important; }
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 1rem 0.85rem;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--accent-dim);
  color: var(--accent2);
}

/* Layout */
.wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}
.page-head { margin-bottom: 1.25rem; }
.page-head .label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent2);
}
.page-head h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 36rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700; font-size: 0.88rem;
  cursor: pointer;
  transition: 0.15s transform, 0.15s opacity, 0.15s background;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0d9488);
  color: #042f2e;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.28);
}
.btn-primary:hover { opacity: 0.93; color: #042f2e; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

/* Cards / grids */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}
.grid-2, .grid-3 { display: grid; gap: 0.9rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Hero */
.hero {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: 1.5rem 0 0.5rem;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; gap: 2rem; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent2);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent2);
}
.hero-desc {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 28rem;
}
.hero-actions {
  margin-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.55rem;
}
.hero-stats {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: rgba(16, 24, 40, 0.7);
  border: 1px solid var(--border);
}
.hero-stats div { text-align: center; }
.hero-stats strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}
.hero-stats span {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* Media / slides / video */
.media-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.media-panel .video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.media-panel video,
.media-panel .video-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.slide-row {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.slide-row img {
  width: 140px; height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .slide-row img { width: 180px; height: 108px; }
}

/* Rank cards */
.rank-card, .product-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: 0.2s border-color, 0.2s transform;
  cursor: pointer;
}
.rank-card:hover, .product-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-2px);
  color: inherit;
}
.rank-card .price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent2);
  margin-top: 0.4rem;
}
.tag {
  display: inline-block;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent2);
  background: var(--accent-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

/* Forms */
.form-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-row { margin-bottom: 0.95rem; }
.hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }

/* Saweria-style nominal chips */
.nominal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
@media (min-width: 480px) {
  .nominal-grid { grid-template-columns: repeat(5, 1fr); }
}
.nominal-btn {
  padding: 0.75rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.15s;
}
.nominal-btn:hover {
  border-color: var(--accent);
  color: var(--accent2);
}
.nominal-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent2);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}
.total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.total-bar strong {
  font-size: 1.15rem;
  color: var(--accent2);
}

.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin: 0.75rem 0;
}
.alert-ok { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-err { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-info { background: rgba(148,163,184,0.08); border: 1px solid var(--border); color: var(--muted); }

/* Developer card */
.dev-card {
  display: grid;
  gap: 1rem;
  align-items: center;
}
@media (min-width: 640px) {
  .dev-card { grid-template-columns: 120px 1fr; }
}
.dev-photo {
  width: 120px; height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(16, 185, 129, 0.35);
  background: var(--bg2);
}
.dev-card h3 { margin: 0 0 0.25rem; }
.dev-card .role { color: var(--accent2); font-size: 0.85rem; font-weight: 600; }

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 1.25rem;
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer h4 {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.4rem; }
.footer a { color: var(--muted); font-size: 0.875rem; }
.footer a:hover { color: var(--accent2); }
.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem; font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid rgba(16,185,129,0.25);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent2);
}

.section { margin: 2rem 0; }
.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
}
.section-sub { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.hidden { display: none !important; }
.qr-box { text-align: center; padding: 1rem; }
.qr-box img { margin: 0.75rem auto; max-width: 240px; border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
