/* My Account — gaya mandiri.
   Halaman ini tidak memuat style.css (berbeda dari halaman lain), jadi
   variabel dan base style didefinisikan di sini. */
@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Rubik:wght@400;500;600;700&display=swap');

:root {
  --ink: #1f2033;
  --sky: #86cff5;
  --paper: #fff6d6;
  --green: #62b845;
  --muted: #4a4c66;
  --line: 3px solid var(--ink);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 16px/1.6 Rubik, system-ui, sans-serif;
}
header, main, footer { max-width: 1200px; margin: auto; padding: 24px 30px; }

header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font: 23px Bungee, system-ui, sans-serif; text-decoration: none; color: inherit; }
.brand span { display: block; font: 10px Rubik, sans-serif; letter-spacing: .18em; }
nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
a { color: inherit; }

h1, h2, h3 { line-height: 1.15; }
h1 { font: clamp(38px, 5vw, 66px)/1.08 Bungee, system-ui, sans-serif; margin: 14px 0 24px; }
h2 { font-size: 28px; margin: 8px 0 20px; }
h3 { font-size: 19px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.small { font-size: 13px; color: var(--muted); }

/* Lapisan tanah: kartu berbingkai seperti halaman lain. */
.layer {
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
  padding: 30px;
  margin: 24px 0;
}
.layer-in > p { max-width: 62ch; }

.btn {
  display: inline-block;
  font: 600 14px Rubik, sans-serif;
  color: var(--ink);
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 5px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #77ce58; }
.btn.alt { background: var(--paper); box-shadow: none; }
.btn.alt:hover { background: #fff; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #994300; outline-offset: 4px; }

/* Form login */
#login-form { max-width: 420px; display: flex; flex-direction: column; gap: 4px; }
#login-form h2 { margin-top: 0; }
#login-form label { font-size: 14px; font-weight: 600; margin-top: 12px; }
#login-form input {
  font: inherit; padding: 12px; width: 100%; min-width: 0;
  border: 2px solid var(--ink); border-radius: 5px; background: #fff; color: var(--ink);
}
#login-form .btn { margin-top: 18px; align-self: flex-start; }

/* Kartu akun */
#account-card { max-width: 640px; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 18px 0 26px; padding: 0;
}
.stats div { border: 2px solid var(--ink); border-radius: 6px; padding: 10px 12px; background: #fffdf3; }
.stats dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-family: Bungee, Rubik, sans-serif; font-size: 20px; }

.items { list-style: none; margin: 8px 0 22px; padding: 0; display: grid; gap: 6px; }
.items li {
  border: 2px solid var(--ink); border-radius: 6px; padding: 8px 10px;
  background: #fffdf3; font-size: 15px; word-break: break-word;
}
#logout { margin-top: 26px; }

.error {
  margin: 16px 0 0; padding: 10px 12px; border-radius: 6px;
  background: #fff0ea; border-left: 4px solid #a83020; color: #8a2313; font-weight: 500;
}

footer { display: flex; flex-wrap: wrap; gap: 12px 22px; font-size: 13px; padding-bottom: 40px; }
[hidden] { display: none !important; }

@media (max-width: 480px) {
  header, main, footer { padding-left: 16px; padding-right: 16px; }
  .layer { padding: 20px; }
  header nav { gap: 12px; font-size: 13px; }
}

/* Grid backpack seperti inventory Growtopia */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, 52px);
  gap: 6px;
  margin: 12px 0 10px;
  padding: 10px;
  background: #39778a;
  border: 3px solid #234a5c;
  border-radius: 8px;
}
.slot {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #4e9caf;
  border: 2px solid #97d0d9;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #346474;
  cursor: pointer;
}
.slot:hover { background: #68b3bf; }
.slot.selected { border-color: #ffe04f; box-shadow: inset 0 0 0 2px #a67a27; }
.slot.empty { background: #3f8899; box-shadow: inset 0 0 0 1px #2f6376; cursor: default; }
.slot img {
  width: 32px; height: 32px;
  image-rendering: pixelated;
  pointer-events: none;
}
.slot b {
  position: absolute;
  right: 2px;
  bottom: 0;
  font: 700 14px Rubik, sans-serif;
  color: #fff;
  text-shadow: 1px 1px 0 #153d4c;
  pointer-events: none;
}
#item-detail { min-height: 22px; font-weight: 500; }
