/* SkinSpin: page styles (home, case page + roulette, inventory, profile, settings, placeholders). */

/* ---------- home ---------- */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 30px; border-radius: 18px; overflow: hidden; position: relative;
  border: 1px solid var(--line); background:
    radial-gradient(600px 300px at 90% 20%, rgba(124, 108, 255, .25), transparent 70%),
    radial-gradient(500px 300px at 10% 100%, rgba(255, 154, 31, .18), transparent 70%), var(--panel);
}
.hero-title { font-size: clamp(34px, 5vw, 54px); line-height: 1; }
.hero-title span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: #b8c0d2; max-width: 560px; margin: 14px 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-side { display: grid; justify-items: center; align-content: center; gap: 16px; }
.hero-logo .logo-mark { width: 96px; height: 96px; animation: spinSlow 14s linear infinite; filter: drop-shadow(0 0 20px rgba(255, 182, 39, .35)); }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.hero-stats { display: grid; gap: 8px; width: 100%; max-width: 300px; margin: 0; }
.hero-stats div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.hero-stats dt { color: var(--muted); }
.hero-stats dd { margin: 0; font-weight: 700; }
.rarity-ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.rung { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--rc) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--line)); }
.rung span { color: var(--rc); font-weight: 700; font-size: 12.5px; }
.rung b { font: 700 22px/1 var(--display); }

/* ---------- case page ---------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 12px; }
.back-link:hover { color: var(--text); }
.case-hero {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; padding: 22px; border-radius: 18px;
  border: 1px solid var(--line); background: radial-gradient(500px 260px at 15% 50%, color-mix(in srgb, var(--case-a) 28%, transparent), transparent 70%), var(--panel);
}
.ch-art { width: 100%; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); }
.ch-info h2 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 6px; }
.ch-info p { margin: 0 0 8px; color: #b8c0d2; }
.ch-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.ch-afford { margin: 10px 0 0; color: #ffb3b3; min-height: 1em; }
.ch-afford a { color: var(--accent); }

.roulette-stage { position: relative; margin-top: 20px; padding: 18px 0 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.roulette { position: relative; overflow: hidden; height: 168px; }
.roulette::before, .roulette::after { content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
.roulette::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.roulette::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.rl-track { display: flex; gap: 8px; height: 100%; will-change: transform; }
.rl-card {
  flex: 0 0 150px; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px;
  border-radius: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 16%, var(--panel)), var(--panel) 70%);
  border: 1px solid var(--line); border-bottom: 3px solid var(--rc); min-width: 0;
}
.rl-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.rl-w { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-f { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-card.rl-win { border-color: var(--rc); box-shadow: inset 0 0 24px color-mix(in srgb, var(--rc) 40%, transparent), 0 0 18px color-mix(in srgb, var(--rc) 45%, transparent); }
.rl-marker { position: absolute; z-index: 3; left: 50%; top: -6px; bottom: -6px; width: 3px; transform: translateX(-50%); background: var(--accent); box-shadow: 0 0 12px var(--accent); border-radius: 3px; pointer-events: none; }
.rl-marker::before, .rl-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent; }
.rl-marker::before { top: 0; border-top-color: var(--accent); }
.rl-marker::after { bottom: 0; border-bottom-color: var(--accent); }
.rl-bar { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding: 6px 16px 0; }

.reveal {
  position: relative; display: grid; place-items: center; padding: 22px 16px; margin: 12px 12px 4px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--line));
  background: radial-gradient(60% 80% at 50% 50%, color-mix(in srgb, var(--rc) 22%, rgba(10, 13, 19, .92)), rgba(10, 13, 19, .96));
  animation: revealIn .35s ease-out; overflow: hidden;
}
.reveal[hidden] { display: none; }
@keyframes revealIn { from { opacity: 0; transform: scale(.96); } }
.rv-body { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; max-width: 760px; width: 100%; }
.rv-art { width: min(320px, 42%); filter: drop-shadow(0 0 22px color-mix(in srgb, var(--rc) 70%, transparent)); animation: artIn .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes artIn { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.rv-info h3 { font-size: 26px; margin: 8px 0 2px; line-height: 1.1; }
.rv-info h3 span { display: block; font-size: 15px; color: var(--muted); font-family: var(--font); font-weight: 500; letter-spacing: 0; }
.rv-info p { margin: 2px 0; }
.rv-value { font-size: 22px; margin: 6px 0 !important; }
.rv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.rv-done { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 600; margin-right: 6px; }
.rv-rays { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px 0 0 -450px; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 30%, transparent) 0 8deg, transparent 8deg 22deg);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 75%);
}
.reveal-big .rv-rays { opacity: 1; animation: rays 18s linear infinite; }
.r-extraordinary .rv-rays { background: repeating-conic-gradient(from 0deg, rgba(245, 196, 49, .38) 0 6deg, transparent 6deg 15deg); }
@keyframes rays { to { transform: rotate(360deg); } }
.reveal-big .rv-art { animation: artIn .5s cubic-bezier(.2, 1.4, .4, 1), floaty 3s ease-in-out .5s infinite; }
@keyframes floaty { 50% { transform: translateY(-6px); } }

.odds-table { display: grid; gap: 6px; margin-bottom: 16px; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.odds-row { display: grid; grid-template-columns: 130px 1fr 72px 64px; align-items: center; gap: 12px; }
.odds-name { color: var(--rc); font-weight: 700; }
.odds-bar { height: 8px; border-radius: 9px; background: var(--panel-3); overflow: hidden; }
.odds-bar span { display: block; height: 100%; background: var(--rc); border-radius: inherit; }
.odds-row b { text-align: right; }
.odds-note { margin-top: 12px; }

/* ---------- inventory ---------- */
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.inv-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.inv-summary b { font-size: 16px; }
.bulk-bar { position: sticky; top: calc(var(--topbar) + 8px); z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius); background: rgba(26, 32, 48, .96); border: 1px solid rgba(255, 182, 39, .4); box-shadow: var(--shadow); }
.bulk-bar[hidden] { display: none; }
.bulk-bar #bulkInfo { margin-right: auto; }
.inv-card .ic-hit { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; border-radius: inherit; }
.inv-card:hover { border-color: var(--line-2); }
.ic-flag { position: absolute; z-index: 2; top: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: rgba(10, 13, 19, .6); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.ic-flag .icon { width: 15px; height: 15px; }
.ic-fav { left: 6px; }
.ic-lock { right: 6px; }
.inv-card:hover .ic-flag, .inv-card:focus-within .ic-flag, .ic-flag.on { opacity: 1; }
.ic-fav.on { color: #ff6b9a; border-color: rgba(255, 107, 154, .4); }
.ic-lock.on { color: var(--accent); border-color: rgba(255, 182, 39, .45); }
@media (hover: none) { .ic-flag { opacity: 1; } }
.ic-check { position: absolute; z-index: 2; left: 50%; top: 8px; transform: translateX(-50%); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-2); background: var(--bg-2); color: transparent; pointer-events: none; }
.ic-check .icon { width: 14px; height: 14px; }
.ic-check.on { background: var(--accent); border-color: var(--accent); color: #1a1205; }
.inv-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.inv-card.is-blocked { opacity: .45; }
.more { display: flex; justify-content: center; margin-top: 16px; }

.inspect { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.inspect-art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius); background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 35%, transparent), transparent), var(--panel); border: 1px solid var(--line); }
.inspect-art img { width: 92%; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--rc) 55%, transparent)); }
.inspect-info h3 { font-size: 24px; margin: 8px 0 2px; line-height: 1.1; }
.inspect-info h3 span { display: block; font: 500 14px var(--font); color: var(--muted); letter-spacing: 0; }
.inspect-value { font-size: 20px; margin: 8px 0; }
.kv { display: grid; gap: 6px; margin: 0 0 14px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.float-bar { position: relative; display: block; width: 140px; height: 6px; margin-top: 5px; border-radius: 6px; background: linear-gradient(90deg, #3ddc84 0 7%, #8fdc3d 7% 15%, #ffd23d 15% 38%, #ff9a3d 38% 45%, #ff5d5d 45%); }
.float-bar span { position: absolute; top: -3px; width: 3px; height: 12px; margin-left: -1px; background: #fff; border-radius: 2px; }
.inspect-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sell-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sell-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--rc); }
.sell-list li:last-child { border-bottom: 0; }
.sell-list img { width: 56px; height: 28px; object-fit: contain; }
.sell-list span { flex: 1; min-width: 0; }
.sell-list em { font-style: normal; font-size: 11px; color: var(--muted); }
.sell-list .fav-tag { color: #ff6b9a; display: inline-flex; align-items: center; gap: 2px; }
.sell-list .fav-tag .icon { width: 12px; height: 12px; }
.sell-total { font-size: 18px; font-weight: 700; margin: 14px 0 4px; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.avatar { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 20px; font: 700 40px/1 var(--display); color: #1a1205; background: linear-gradient(135deg, var(--accent), var(--violet)); }
.profile-id { flex: 1; min-width: 0; }
.profile-id h2 { display: flex; align-items: center; gap: 12px; font-size: 30px; flex-wrap: wrap; word-break: break-word; }
.profile-id p { margin: 2px 0 10px; }
.name-form { display: flex; gap: 8px; max-width: 420px; }
.level-row { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.lvl-lg { min-width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
.lvl-wide { flex: 1; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.lvl-wide .xp-bar { width: 100%; height: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 16px 0 0; }
.stat { padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.stat dt { color: var(--muted); font-size: 12.5px; }
.stat dd { margin: 4px 0 0; font: 700 20px/1.2 var(--display); }
.profile-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.rarity-bars { display: grid; gap: 6px; margin-bottom: 20px; }
.rbar { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; }
.rbar > span:first-child { color: var(--rc); font-weight: 600; font-size: 13px; }
.rbar-track { height: 8px; border-radius: 8px; background: var(--panel-3); overflow: hidden; }
.rbar-track span { display: block; height: 100%; background: var(--rc); }
.rbar b { text-align: right; }
.best-drop { max-width: 220px; }
.activity { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); max-height: 520px; overflow-y: auto; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.act-meta { display: grid; justify-items: end; font-size: 12px; color: var(--muted); white-space: nowrap; }
.act-meta span { font-weight: 700; font-size: 13px; }

/* ---------- settings ---------- */
.settings { max-width: 760px; }
.settings h2 { font-size: 20px; margin: 22px 0 10px; }
.settings h2:first-child { margin-top: 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin-bottom: 8px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.setting b, .setting small { display: block; }
.setting small { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.setting select { height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); }
.setting-ctl { display: flex; align-items: center; gap: 12px; }
.setting-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- placeholders ---------- */
.placeholder { max-width: 640px; margin: 20px auto; padding: 32px; text-align: center; border-radius: 18px; border: 1px dashed var(--line-2); background: var(--panel); }
.ph-icon .icon { width: 54px; height: 54px; color: var(--violet); }
.ph-badge { display: inline-block; margin: 10px 0; padding: 4px 12px; border-radius: 99px; background: rgba(124, 108, 255, .15); border: 1px solid rgba(124, 108, 255, .45); color: #c3bbff; font-size: 12px; font-weight: 700; }
.placeholder h2 { font-size: 34px; }
.placeholder > p { color: #b8c0d2; }
.placeholder h3 { font-size: 16px; margin-top: 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.placeholder ul { display: inline-grid; gap: 4px; text-align: left; padding-left: 20px; }
.ph-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero-side { display: none; }
  .rarity-ladder { grid-template-columns: repeat(4, 1fr); }
  .case-hero { grid-template-columns: 1fr; text-align: center; }
  .ch-art { max-width: 220px; justify-self: center; }
  .ch-actions { justify-content: center; }
  .profile-cols { grid-template-columns: 1fr; }
  .inspect { grid-template-columns: 1fr; }
  .rv-body { flex-direction: column; text-align: center; gap: 8px; }
  .rv-art { width: min(240px, 70%); }
  .rv-actions { justify-content: center; }
}
@media (max-width: 640px) {
  .rl-card { flex-basis: 118px; }
  .roulette { height: 140px; }
  .odds-row { grid-template-columns: 90px 1fr 60px; }
  .odds-row .small { display: none; }
  .rarity-ladder { grid-template-columns: repeat(2, 1fr); }
  .profile-head { flex-direction: column; text-align: center; }
  .profile-id h2, .level-row { justify-content: center; margin-left: auto; margin-right: auto; }
}
