/* GFF Latin */
@font-face {
  font-family: 'GFF Latin';
  src: url('assets/fonts/GFF-Latin-Thin.woff2') format('woff2'),
       url('assets/fonts/GFF-Latin-Thin.woff') format('woff'),
       url('assets/fonts/GFF-Latin-Thin.ttf') format('truetype');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'GFF Latin';
  src: url('assets/fonts/GFF-Latin-Regular.woff2') format('woff2'),
       url('assets/fonts/GFF-Latin-Regular.woff') format('woff'),
       url('assets/fonts/GFF-Latin-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'GFF Latin';
  src: url('assets/fonts/GFF-Latin-Medium.woff2') format('woff2'),
       url('assets/fonts/GFF-Latin-Medium.woff') format('woff'),
       url('assets/fonts/GFF-Latin-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'GFF Latin';
  src: url('assets/fonts/GFF-Latin-Bold.woff2') format('woff2'),
       url('assets/fonts/GFF-Latin-Bold.woff') format('woff'),
       url('assets/fonts/GFF-Latin-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #070605;
  --card: rgba(16, 12, 9, 0.9);
  --border: rgba(255, 120, 0, 0.22);
  --text: #fff8ee;
  --muted: #9a8870;
  --accent: #ff6a00;
  --accent2: #ffb300;
  --gold: #ffc107;
  --radius: 10px;
  --font: "GFF Latin", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
*, button, input, textarea, select { font-family: var(--font) !important; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background image responsive */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8,6,4,0.58) 0%, rgba(8,6,4,0.75) 50%, rgba(8,6,4,0.9) 100%),
    url("assets/bg.webp") center center / cover no-repeat;
  background-color: #0a0806;
}
.bg-grid { display: none !important; }

/* Header */
.top {
  position: relative; z-index: 2;
  max-width: 920px; margin: 0 auto;
  padding: 14px 14px 6px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(16, 12, 9, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.brand-logo {
  width: 48px; height: 48px; object-fit: contain; flex-shrink: 0;
}
.brand-text strong {
  display: block; font-size: 14px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; color: #fff;
}
.brand-text span {
  font-size: 10px; color: var(--muted);
  letter-spacing: 0.3px; text-transform: uppercase;
}

/* Layout */
.wrap {
  position: relative; z-index: 2;
  max-width: 920px; margin: 0 auto;
  padding: 8px 14px 40px;
  display: flex; flex-direction: column; gap: 12px;
  width: 100%;
}

/* Cards — garis tipis */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,120,0,0.55), rgba(255,180,0,0.25), transparent 80%);
}
.card::after { display: none; }

/* Hero */
.hero-card {
  text-align: center;
  padding: 22px 16px 20px;
}
.hero-badge {
  display: inline-block;
  padding: 3px 12px; margin-bottom: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: #1a0a00;
  background: linear-gradient(90deg, #ffc107, #ff6a00);
  border-radius: 999px;
}
.hero-card h1 {
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 25%, #ffb300 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-card p {
  color: var(--muted); font-size: 13px;
  max-width: 480px; margin: 0 auto; line-height: 1.55;
}
.hero-card p strong { color: var(--gold); font-weight: 700; }

/* Section heads — garis tipis */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 120, 0, 0.12);
}
.sec-head h2 {
  font-size: 13px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: #ffe8c0;
  display: flex; align-items: center; gap: 6px;
}
.sec-head h2::before {
  content: "";
  width: 3px; height: 12px; border-radius: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.hint {
  font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,120,0,0.12);
  white-space: nowrap;
}
.hint.ok {
  color: var(--gold);
  border-color: rgba(255, 193, 7, 0.3);
  background: rgba(255, 160, 0, 0.1);
}
.skin-rank-note {
  font-size: 12px; color: var(--muted); margin: -2px 0 10px;
}

/* Category tabs */
.category-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px;
}
.cat-tab {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 120, 0, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #b8a890;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cat-tab small {
  font-size: 9px; opacity: 0.75;
  background: rgba(255,255,255,0.06);
  padding: 1px 5px; border-radius: 999px;
}
.cat-tab:hover {
  border-color: rgba(255, 140, 0, 0.45);
  color: #ffe8c8;
}
.cat-tab.active {
  background: rgba(255, 110, 0, 0.22);
  border-color: rgba(255, 160, 0, 0.5);
  color: var(--gold);
}

/* Search */
.skin-search-wrap { margin: 0 0 10px; }
.skin-search {
  width: 100%; border-radius: 8px;
  border: 1px solid rgba(255, 120, 0, 0.22);
  background: rgba(0, 0, 0, 0.45); color: #fff;
  padding: 11px 12px; font-size: 14px; font-weight: 500;
  outline: none;
}
.skin-search::placeholder { color: #7a6a58; }
.skin-search:focus {
  border-color: rgba(255, 120, 0, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 110, 0, 0.1);
}

/* Skin scroll + grid */
.skin-scroll {
  max-height: min(52vh, 480px);
  overflow-y: auto; overflow-x: hidden;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 0, 0.12);
  background: rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 120, 0, 0.4) transparent;
  -webkit-overflow-scrolling: touch;
}
.skin-scroll::-webkit-scrollbar { width: 4px; }
.skin-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 120, 0, 0.4);
  border-radius: 4px;
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.skin-item {
  position: relative;
  border: 1px solid rgba(255, 120, 0, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: #14110c;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left; padding: 0; color: inherit; font: inherit; width: 100%;
  opacity: 0; transform: translateY(10px);
}
.skin-item.skin-visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.15s, box-shadow 0.15s;
}
.skin-item:hover {
  border-color: rgba(255, 140, 0, 0.45);
  box-shadow: 0 4px 14px rgba(255, 110, 0, 0.15);
}
.skin-item.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.skin-item .skin-img-wrap {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1a1510, #0e0c0a);
}
.skin-item .skin-img-wrap img,
.skin-item img.skin-img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center; display: block;
}
.skin-item .skin-name {
  display: block; padding: 6px 4px 8px;
  font-size: 10px; font-weight: 600; line-height: 1.2;
  color: #f0dcc0; text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 120, 0, 0.08);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.skin-item .skin-order {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc107, #ff6a00);
  color: #1a0a00;
  font-size: 10px; font-weight: 800; line-height: 18px; text-align: center;
  pointer-events: none;
}
.skin-item .skin-picks {
  position: absolute; left: 4px; bottom: 4px; z-index: 2;
  padding: 1px 5px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--gold); font-size: 9px; font-weight: 700;
  pointer-events: none;
}
.skin-empty {
  grid-column: 1 / -1; text-align: center;
  color: var(--muted); font-size: 13px; padding: 28px 12px;
}

/* Form */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: #e8d4b8;
}
.form label small {
  font-weight: 500; color: var(--muted);
  text-transform: none; letter-spacing: 0;
}
.form input[type="text"],
.form textarea {
  width: 100%; border-radius: 8px;
  border: 1px solid rgba(255, 120, 0, 0.2);
  background: rgba(0, 0, 0, 0.45); color: #fff;
  padding: 11px 12px; font-size: 14px; font-weight: 500;
  outline: none;
}
.form input:focus, .form textarea:focus {
  border-color: rgba(255, 120, 0, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 110, 0, 0.1);
}
.form textarea {
  resize: vertical; min-height: 72px;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}

/* Selected bar */
.selected-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px;
  background: rgba(255, 110, 0, 0.08);
  border: 1px solid rgba(255, 120, 0, 0.22);
}
.selected-bar img {
  width: 40px; height: 40px; border-radius: 6px;
  object-fit: contain; background: #14110c;
}
.selected-bar strong { display: block; font-size: 12px; color: var(--gold); }
.selected-bar span { font-size: 11px; color: var(--muted); }
.selected-thumbs {
  display: flex; gap: 5px; flex-shrink: 0; align-items: center;
}
.selected-thumbs img {
  width: 38px; height: 38px; border-radius: 6px;
  object-fit: contain; background: #14110c;
  border: 1px solid rgba(255, 160, 0, 0.25);
}
.selected-bar.has-pick { animation: barPop 0.3s ease; }
@keyframes barPop {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

/* ===== Buttons FF logo orange-gold ===== */
.btn-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffc107 0%, #ff8a00 40%, #ff5500 100%);
  color: #1a0a00;
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.8px; text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 4px 16px rgba(255, 100, 0, 0.4),
    inset 0 1px 0 rgba(255, 230, 150, 0.45);
  transition: filter 0.15s, transform 0.15s;
}
.btn-send:hover {
  filter: brightness(1.06);
}
.btn-send:active { transform: scale(0.98); }
.btn-send:disabled {
  opacity: 0.55; cursor: not-allowed; filter: none;
}

.btn-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 14px; margin-top: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 120, 0, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #c9b8a0;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-back:hover {
  background: rgba(255, 110, 0, 0.1);
  border-color: rgba(255, 160, 0, 0.45);
  color: #ffe8c8;
}
.form-note {
  text-align: center; font-size: 11px; color: var(--muted);
}

/* Redeem */
.redeem-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.redeem-desc strong { color: var(--gold); }
.redeem-success-box { text-align: center; padding: 16px 8px 8px; }
.redeem-img {
  width: 100px; height: 100px; object-fit: contain;
  margin: 0 auto 12px; display: block;
  filter: drop-shadow(0 6px 16px rgba(255, 160, 0, 0.35));
}
.redeem-msg {
  font-size: 14px; font-weight: 700; color: var(--gold);
  line-height: 1.4; margin-bottom: 6px;
}
.redeem-sub { font-size: 12px; color: var(--muted); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 20px;
  transform: translateX(-50%) translateY(16px);
  z-index: 50;
  min-width: 220px; max-width: calc(100vw - 28px);
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(16, 12, 9, 0.96);
  border: 1px solid rgba(255, 120, 0, 0.3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast strong {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 2px; color: var(--gold);
}
.toast span { font-size: 12px; color: var(--muted); }
.toast.error { border-color: rgba(220, 60, 40, 0.45); }
.toast.error strong { color: #ff6b5a; }

/* Reveal */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.reveal.show { opacity: 1; transform: translateY(0); }

/* UID check */
.uid-check {
  display: block; margin-top: 5px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2px; text-transform: none; line-height: 1.3;
}
.uid-check.loading { color: var(--muted); }
.uid-check.ok { color: #5ddea0; }
.uid-check.err { color: #ff6b5a; }
.uid-check strong { color: var(--gold); font-weight: 800; }

/* ========== RESPONSIVE ========== */
@media (min-width: 480px) {
  .skin-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .top { padding: 16px 16px 8px; }
  .wrap { padding: 10px 16px 48px; gap: 14px; }
  .card { padding: 18px 16px; }
  .brand-logo { width: 52px; height: 52px; }
  .brand-text strong { font-size: 15px; }
}

@media (min-width: 640px) {
  .skin-grid { grid-template-columns: repeat(4, 1fr); }
  .skin-scroll { max-height: min(56vh, 520px); }
  .skin-item .skin-name { font-size: 11px; }
}

@media (min-width: 768px) {
  .skin-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
  .wrap { max-width: 920px; }
}

/* kecil banget */
@media (max-width: 360px) {
  .skin-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .cat-tab { padding: 6px 9px; font-size: 10px; }
  .hero-card h1 { font-size: 20px; }
  .brand-text strong { font-size: 12px; }
  .brand-text span { font-size: 9px; }
  .btn-send { font-size: 12px; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .skin-item, .skin-item.skin-visible, .reveal, .selected-bar.has-pick {
    transition: none !important; animation: none !important;
    opacity: 1 !important; transform: none !important;
  }
}


/* ===== Selected names: jangan numpuk ===== */
.sec-head {
  flex-wrap: wrap;
}
.hint {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-bar {
  flex-wrap: wrap;
  align-items: flex-start;
}
.selected-bar > div:last-child {
  flex: 1 1 120px;
  min-width: 0;
}
.selected-bar strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
  line-height: 1.3;
}
.selected-bar span {
  display: block;
  margin-top: 2px;
}
.selected-thumbs {
  flex-wrap: wrap;
  max-width: 100%;
}
@media (max-width: 480px) {
  .selected-bar {
    gap: 8px;
  }
  .selected-thumbs img {
    width: 32px;
    height: 32px;
  }
  .selected-bar strong {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }
  .hint {
    font-size: 10px;
    padding: 2px 7px;
  }
}
