/* Outfit & Skin — web version of com.all.outfit.skin.rblx.clothes
   Sizes mirror the Android layouts (1dp ≈ 1px, 1sp ≈ 1px). */

@font-face { font-family: "AN"; src: url("../assets/fonts/regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "AN"; src: url("../assets/fonts/medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "AN"; src: url("../assets/fonts/semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "AN"; src: url("../assets/fonts/bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --app: #38b6ff;
  --back: #0a0a0a;
  --item: #171717;
  --txt1: #ffffff;
  --txt2: rgba(255, 255, 255, 0.6);
  --txt3: rgba(255, 255, 255, 0.7);
  --shell: 430px;
  --gutter: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #000;
  color: var(--txt1);
  font-family: "AN", "Archivo Narrow", system-ui, sans-serif;
  font-weight: 500;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* The whole site renders as a phone-width app on every screen size. */
html { background: #000; }
#app {
  position: relative; width: 100%; max-width: var(--shell); margin: 0 auto;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--back); box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 0 60px rgba(0,0,0,.6);
}
.screen { flex: 1; display: flex; flex-direction: column; animation: fadeIn .18s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- gradient text (Android LinearGradient shader, top → bottom) ---------- */
.g-text { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.g0 { background-image: linear-gradient(180deg, #ADE8C8 0%, #DBFEE8 50%, #59EC81 100%); }
.g1 { background-image: linear-gradient(180deg, #89CFE9 0%, #D9FFFF 50%, #3485C6 100%); }
.g2 { background-image: linear-gradient(180deg, #FAEB76 0%, #FDF8E2 50%, #F1BC70 100%); }
.g3 { background-image: linear-gradient(180deg, #E68485 0%, #EAF2F4 50%, #BF2D30 100%); }
.g4 { background-image: linear-gradient(180deg, #90A8E6 0%, #DCE3FF 50%, #4941D4 100%); }
.g5 { background-image: linear-gradient(180deg, #F08CC2 0%, #FFDAEF 50%, #ED426F 100%); }

.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- headers ---------- */
.page-header {
  background: linear-gradient(90deg, #17292d 0%, #0a0a0a 100%);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: var(--shell); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--gutter);
}
.line-white { height: 1px; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #fff 50%, rgba(255,255,255,0) 100%); }

.page-header .header-inner { min-height: 64px; padding-top: 4px; padding-bottom: 4px; }
.back-btn { width: 50px; height: 43px; flex: none; display: grid; place-items: center; }
.back-btn img { width: 50px; height: 43px; }
.page-title { flex: 1; min-width: 0; margin: 0; font-size: 20px; font-weight: 600; }

/* ---------- containers ---------- */
.content { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 6px var(--gutter) 24px; }
.stack > * + * { margin-top: 12px; }
.content.home { padding-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- home ---------- */
.home-grid {
  display: grid; gap: 12px; grid-template-columns: 1fr 1fr; padding-top: 6px;
}
.home-grid .span2 { grid-column: span 2; }
.banner-card { position: relative; display: block; border-radius: 16px; overflow: hidden; transition: transform .15s; }
.banner-card:active, .tile:active, .grid-card:active, .row-item:active { transform: scale(.98); }
.banner-card > img { width: 100%; height: auto; }
.banner-card .bc-text {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 14px; padding-inline-end: 48%;
}
.bc-title { font-size: 24px; font-weight: 700; line-height: 1.1; }
.bc-sub { font-size: 14px; font-weight: 500; color: var(--txt3); margin-top: 4px; line-height: 1.25; }
.click-btn {
  margin-top: 15px; width: 80px; height: 26px; display: grid; place-items: center;
  background: center / 100% 100% no-repeat; font-size: 11px; font-weight: 600; margin-inline-start: 2px;
  padding: 0 4px;
}
.tile { position: relative; display: block; border-radius: 16px; overflow: hidden; transition: transform .15s; }
.tile > img { width: 100%; height: auto; }
.tile .tile-title {
  position: absolute; top: 4px; left: 6px; right: 6px; text-align: center;
  font-size: 20px; font-weight: 700; line-height: 1.5;
}

/* ---------- grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-card {
  position: relative; display: block; border-radius: 16px; overflow: hidden;
  aspect-ratio: 644 / 760; background: center / 100% 100% no-repeat; transition: transform .15s;
}
.grid-card .gc-title {
  position: absolute; top: 10px; left: 8px; right: 8px; text-align: center;
  font-size: 20px; font-weight: 700; line-height: 1.3;
}
.grid-card .gc-img {
  position: absolute; left: 8%; right: 8%; top: 22%; bottom: 8%;
  width: 84%; height: 70%; object-fit: contain;
}
.grid-card.emote { background: var(--item); border-radius: 14px; }
.grid-card.emote .gc-title { color: var(--txt1); }

.game-card { position: relative; display: block; border-radius: 16px; overflow: hidden; transition: transform .15s; }
.game-card img { width: 100%; aspect-ratio: 1340 / 748; object-fit: cover; }
.game-card .game-name {
  position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 1, 7, 0.9);
  text-align: center; font-size: 22px; font-weight: 700; padding: 6px 10px;
}
.game-card .game-name span { display: block; }
.game-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.outfit-cats { display: grid; grid-template-columns: 1fr; gap: 12px; }

.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* ---------- rows (sound list) ---------- */
.rows { display: grid; gap: 12px; }
.row-item {
  display: flex; align-items: center; gap: 12px; background: var(--item); border-radius: 15px;
  padding: 10px; min-height: 63px; width: 100%; text-align: start; transition: transform .15s;
}
.row-icon {
  width: 43px; height: 43px; flex: none; border-radius: 10px; background: rgba(255,255,255,.05);
  display: grid; place-items: center;
}
.row-icon img { width: 24px; height: 24px; }
.row-icon.full img { width: 100%; height: 100%; border-radius: 10px; }
.row-label { flex: 1; min-width: 0; font-size: 21px; font-weight: 500; }
.row-item.small .row-label { font-size: 17px; }
.row-next { width: 33px; height: auto; flex: none; opacity: .9; }

/* ---------- detail / show screens ---------- */
.show-head { text-align: center; margin: 14px 0 0; }
.show-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.show-head p { margin: 4px 0 0; font-size: 14px; }
.stage {
  position: relative; width: 100%; max-width: 370px; margin: 0 auto; aspect-ratio: 1480 / 1540;
  background: url("../assets/img/show_back_1.webp") center / contain no-repeat;
  display: grid; place-items: center; margin-top: -18px; margin-bottom: -40px;
  pointer-events: none;
}
.stage ~ * { position: relative; z-index: 1; }
.stage img.item {
  width: 60%; height: 200px; object-fit: contain; transform: translateY(-6%);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--app); border-radius: 12px; min-height: 55px; padding: 10px 16px;
  font-size: 20px; font-weight: 700; color: #fff; transition: filter .15s, transform .15s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.feature-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.feature-tile { position: relative; border-radius: 14px; overflow: hidden; }
.feature-tile img { width: 100%; aspect-ratio: 428 / 425; object-fit: cover; }
.feature-tile span {
  position: absolute; top: 4px; left: 4px; right: 4px; text-align: center; font-size: 18px; font-weight: 700;
}

/* ---------- scratch ---------- */
.scratch-wrap { position: relative; height: 60px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.id-row { position: absolute; inset: 0; display: flex; gap: 0; }
.id-box {
  flex: 1; min-width: 0; background: #262626; border-radius: 12px 0 0 12px; display: flex; align-items: center;
  padding: 0 18px; font-size: 20px; font-weight: 600; letter-spacing: .18em; overflow: hidden; white-space: nowrap;
}
.copy-btn {
  background: var(--app); border-radius: 12px; display: flex; align-items: center; gap: 6px;
  padding: 0 18px; font-size: 17px; font-weight: 600; flex: none;
}
.copy-btn img { width: 18px; height: 18px; }
.scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; border-radius: 12px; }

/* ---------- progress / download ---------- */
.prep { text-align: center; margin-top: 4px; }
.prep p { font-size: 18px; font-weight: 500; margin: 0 0 10px; }
.bar { height: 6px; border-radius: 5px; background: rgba(56,182,255,.2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--app); border-radius: 5px; transition: width .03s linear; }
.done-title { text-align: center; font-size: 20px; font-weight: 600; margin: 14px 0 0; }
.disclaimer, .game-desc { color: #dde3f0; font-size: 15px; line-height: 1.45; }
.disclaimer { text-align: center; margin: 14px 4px 0; }
.game-desc p { margin: 10px 0 0; }
.game-hero { width: 100%; border-radius: 16px; aspect-ratio: 1340 / 748; object-fit: cover; margin: 8px 0 16px; }

/* ---------- calculator ---------- */
.calc-input {
  display: flex; align-items: center; background: #1f1f1f; border-radius: 14px; height: 64px;
  padding: 0 10px 0 18px; margin-top: 10px;
}
.calc-input input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 18px;
}
.calc-input input::placeholder { color: rgba(255,255,255,.55); }
.calc-input button { width: 40px; height: 44px; display: grid; place-items: center; }
.calc-input button img { width: 40px; height: 44px; }
.count-btn {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1604 / 260; max-height: 70px; margin-top: 18px;
  background: url("../assets/img/btn_back3.webp") center / 100% 100% no-repeat; font-size: 22px; font-weight: 700;
  border-radius: 12px; transition: transform .15s;
}
.count-btn:active { transform: scale(.98); }
.calc-result { text-align: center; font-size: 16px; margin-top: 18px; }

/* ---------- sound player ---------- */
.sound-stage { width: 100%; max-width: 375px; margin: 0 auto; aspect-ratio: 1500 / 1540; }
.sound-stage img { width: 100%; height: 100%; object-fit: contain; }
.sound-name { text-align: center; font-size: 20px; font-weight: 500; margin: -30px 0 14px; }
.seek-row { display: flex; align-items: center; gap: 12px; }
.seek-row img { width: 34px; height: 34px; }
input[type=range].seek {
  -webkit-appearance: none; appearance: none; flex: 1; height: 12px; background: transparent; cursor: pointer;
}
.seek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(232,232,232,.2) var(--p, 0%)); border-radius: 2px; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -5px; }
.seek::-moz-range-track { height: 2px; background: rgba(232,232,232,.2); }
.seek::-moz-range-progress { height: 2px; background: #fff; }
.seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.controls { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 0 14px; }
.controls button img { width: 76px; height: 76px; }
.controls .play img { width: 80px; height: 80px; }
.controls .play { margin: 0 14px; }

/* ---------- dialogs / toast / states ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 20px; animation: fadeIn .15s; }
.unlock-dialog {
  width: 100%; max-width: 300px; aspect-ratio: 1148 / 1024; background: url("../assets/img/exit_back.webp") center / 100% 100% no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; text-align: center;
}
.unlock-dialog h3 { margin: 0; font-size: 24px; font-weight: 700; white-space: pre-line; line-height: 1.2; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 5px solid rgba(56,182,255,.2); border-top-color: var(--app); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 120;
  background: #2b2b2b; color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4); animation: fadeIn .15s; max-width: calc(100% - 32px); text-align: center;
}
.state { text-align: center; padding: 60px 20px; color: var(--txt2); font-size: 18px; }
.state .spinner { margin: 0 auto 14px; }
.skeleton { background: linear-gradient(90deg, #151515 25%, #1d1d1d 50%, #151515 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 16px; aspect-ratio: 644 / 760; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.footer-note { text-align: center; color: rgba(255,255,255,.35); font-size: 13px; padding: 18px 16px 28px; max-width: 700px; margin: 0 auto; }

/* Hooks reserved for ads — intentionally empty for now. */
.ad-slot:empty { display: none; }
