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

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

:root {
  --bg:      #0d0d0d;
  --surface: #161616;
  --border:  #2a2a2a;
  --accent:  #a8ff57;
  --text:    #f0f0f0;
  --muted:   #555;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── NAVBAR ──────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(13,13,13,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.navbar-brand span { color: var(--accent); }

.hamburger-btn {
  width: 36px; height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger-btn span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── NAV OVERLAY (transparan, cuma buat detect klik di luar dropdown) ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: visibility .18s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

/* ─── DROPDOWN MENU (kotak kecil, bukan full-height) ──────────────────── */
.nav-menu {
  position: fixed;
  top: 68px;
  right: 16px;
  width: auto;
  min-width: 180px;
  max-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  z-index: 200;
  overflow: hidden;
  transform: translateY(-8px) scale(.96);
  opacity: 0;
  visibility: hidden;
  transform-origin: top right;
  transition: transform .18s ease, opacity .18s ease, visibility .18s ease;
}
.nav-menu.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.nav-menu-list {
  list-style: none;
  padding: 6px 0;
}
.nav-menu-link {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-menu-link:hover {
  background: rgba(168,255,87,.07);
  color: var(--accent);
}

/* ─── PAGE CONTENT (centers the card below the navbar) ───────────────── */
.page-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 84px 24px 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.header h1 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; }
.header h1 span { color: var(--accent); }
.header p { font-size: .82rem; color: var(--muted); margin-top: 4px; }

label {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: .88rem;
  outline: none;
  transition: border-color .18s;
}
input[type="text"]:focus { border-color: var(--accent); }
input[type="text"]::placeholder { color: var(--muted); }

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

.shape-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.shape-opt:hover { border-color: #444; }
.shape-opt.selected {
  border-color: var(--accent);
  background: rgba(168,255,87,.07);
}
.shape-opt svg { width: 32px; height: 32px; }
.shape-opt span { font-size: .68rem; color: var(--muted); }
.shape-opt.selected span { color: var(--accent); }

/* Shape description hint */
.shape-hint {
  font-size: .72rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 2px;
}
.shape-hint strong { color: var(--accent); }

.color-row { display: flex; gap: 12px; }
.color-field { flex: 1; }

.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.color-input-wrap input[type="color"] {
  width: 26px; height: 26px;
  border: none; background: none;
  cursor: pointer; padding: 0; border-radius: 4px;
}
.color-hex {
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  width: 68px;
}

.btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #0d0d0d;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:hover  { opacity: .88; }
.btn:active { transform: scale(.98); }

.divider { height: 1px; background: var(--border); }

.qr-output {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.qr-output.visible { display: flex; }

.qr-canvas-wrap {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  line-height: 0;
}

.qr-label {
  font-size: .74rem;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-btn {
  padding: 9px 22px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.download-btn:hover { background: var(--accent); color: #0d0d0d; }

/* ─── FOOTER (di dalam card) ──────────────────────────────────────────── */
.site-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 4px;
}
.footer-credit {
  font-size: .95rem;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}
.footer-credit span { color: var(--accent); }
.footer-brand {
  font-size: .76rem;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}
.footer-brand span { color: var(--accent); }
.footer-copy {
  font-size: .68rem;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  letter-spacing: .05em;
  opacity: .7;
}

@media (max-width: 480px) {
  .card { padding: 24px 16px; }
  .page-content { padding: 76px 16px 20px; }
}
