/* =========================================================
   데모5 스킨 — 검정 + 금색 카지노 시안 (메인시안-8 · 2026-11-14)
   - 3008 포트에서만 서버가 api.css 다음에 넣어요. 회원 화면 마크업 · data-* hook 은 그대로, 색 · 모양만 바꿔요.
   - 서버(render/demo5-home.ts)가 더하는 칸: 왼쪽 메뉴 위 당첨 최고액 · 바로가기 4칸 · 아래 혜택 카드, 하단 탭 [입금 +], 홈 .d5-home
   - 이름은 모두 d5- 로 시작 · 움직임은 assets/js/demo5.js
   ========================================================= */

/* ---------- 1. 토큰: 검정 + 금색 ---------- */
:root, [data-theme="space"] {
  --space-900: #0b0b0d;
  --space-800: #121215;
  --space-700: #19191d;
  --space-600: #222228;
  --space-500: #2c2c33;
  --line: #26262d;
  --line-strong: #6e5a24;
  --ink: #f6f1e4;
  --ink-2: #b8b09c;
  --ink-3: #85806f;

  --gold: #f2c14e;
  --gold-hi: #ffe39a;
  --gold-lo: #b8860b;
  --gold-grad: linear-gradient(180deg, #ffe39a 0%, #f2c14e 45%, #c8901e 100%);
  --blue-500: #f2c14e;   /* 주요 동작 = 금색 */
  --blue-600: #d9a52e;
  --blue-400: #ffd978;
  --on-blue: #1a1305;
  --yellow-400: #f2c14e;
  --yellow-600: #c99a2e;
  --on-bright: #1a1305;
  --violet-600: #5a4514;
  --violet-300: #d9c48a;
  --pink-500: #ff4d5e;
  --mint-500: #3ed38a;
  --coral-500: #ff5a5a;
  --focus: #ffe39a;

  --glow-blue: rgba(242, 193, 78, .22);
  --glow-violet: rgba(242, 193, 78, .14);
  --scrim: rgba(0, 0, 0, .74);
  --card-hover: rgba(0, 0, 0, .55);
  --shadow-pop: 0 14px 36px rgba(0, 0, 0, .7);
  --glow-primary: 0 6px 18px rgba(242, 193, 78, .28);
}
html { color-scheme: dark; }
body { background: var(--space-900); color: var(--ink); }
::selection { background: #6e5a24; color: #fff; }

/* ---------- 2. 버튼 · 머리말 ---------- */
.ws-btn-primary { background: var(--gold-grad); color: var(--on-blue); border: 0; box-shadow: 0 4px 14px rgba(242, 193, 78, .25), inset 0 1px 0 rgba(255, 255, 255, .5); font-weight: 800; }
.ws-btn-primary:hover { filter: brightness(1.07); }
.ws-btn-outline { background: transparent; color: var(--gold); border-color: var(--gold); }
.ws-btn-outline:hover { background: rgba(242, 193, 78, .1); }
.ws-btn-gold { background: var(--gold-grad); color: var(--on-blue); }
.hd { background: #0f0f12; border-bottom-color: #1f1f25; }
.hd-btn, .hd-user, .hd-lang { background: #18181c; border-color: #2a2a31; }
.ws-balance { border-color: #3a3220; }
.ws-sechead-title h3 { color: var(--ink); }
.ws-sechead-title h3::after { content: ""; display: block; width: 26px; height: 3px; margin-top: 4px; border-radius: 3px; background: var(--gold-grad); }
.page-title h1 { color: var(--gold-hi); }
@media (max-width: 1023px) { [data-auth="member"] .hd-logo img { content: url("../img/skin-demo5/emblem.svg"); width: 32px; height: 32px; } }

/* ---------- 3. 왼쪽 메뉴 ---------- */
.side { background: #0f0f12; border-right-color: #1f1f25; gap: 18px; }
.side-title { color: var(--gold); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.side-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(242, 193, 78, .35), transparent); }
.ws-nav { color: var(--ink-2); }
.ws-nav:hover { background: #1b1b20; color: var(--ink); }
.ws-nav.is-active { background: linear-gradient(90deg, rgba(242, 193, 78, .16), rgba(242, 193, 78, 0)); box-shadow: inset 3px 0 0 var(--gold); color: var(--gold-hi); }
.side-help { background: #151518; border-color: #26262d; }
.d5-side-top { display: flex; flex-direction: column; gap: 10px; }
.d5-jack { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none; background: radial-gradient(120% 140% at 0% 0%, rgba(242, 193, 78, .35), transparent 60%), linear-gradient(135deg, #2a2008, #120f07); border: 1px solid rgba(242, 193, 78, .45); box-shadow: inset 0 1px 0 rgba(255, 227, 154, .2); }
.d5-jack img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.d5-jack-t { display: flex; flex-direction: column; min-width: 0; }
.d5-jack-t small { font-size: 10.5px; font-weight: 700; color: var(--gold); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d5-jack-t b { font-size: 19px; font-weight: 900; letter-spacing: -.02em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d5-jack:hover { border-color: var(--gold); }
.d5-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.d5-qt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 7px; border-radius: 12px; background: #17171b; border: 1px solid #26262d; color: var(--ink-2); font: inherit; font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; }
.d5-qt img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.d5-qt:hover { border-color: var(--gold); color: var(--gold-hi); }
.d5-vip { position: relative; display: flex; align-items: center; min-height: 104px; padding: 14px; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, #3a2a08 0%, #1a1408 60%, #0f0d08 100%); border: 1px solid rgba(242, 193, 78, .4); }
.d5-vip-t { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; max-width: 62%; }
.d5-vip-t em { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: var(--gold-grad); color: var(--on-blue); letter-spacing: .08em; }
.d5-vip-t b { font-size: 15px; font-weight: 900; margin-top: 4px; }
.d5-vip-t small { font-size: 11px; color: var(--ink-2); }
.d5-vip img { position: absolute; right: 4px; top: 50%; width: 92px; height: 92px; transform: translateY(-50%); object-fit: cover; border-radius: 14px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.d5-vip:hover { border-color: var(--gold); }
.side-collapsed .side .d5-side-top, .side-collapsed .side .d5-vip { display: none; }

/* ---------- 4. 휴대폰 하단 탭 — 가운데 둥근 금색 [입금 +] ---------- */
.ws-tabbar { background: #0f0f12; border-top-color: #24242b; overflow: visible; }
.ws-tabbar-item { color: var(--ink-3); }
.ws-tabbar-item svg.ws-icon { opacity: .7; }
.ws-tabbar-item.is-active { color: var(--gold-hi); }
.ws-tabbar-item.is-active::before { background: var(--gold); }
.d5-dep i { display: grid; place-items: center; width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; background: var(--gold-grad); color: var(--on-blue); font-style: normal; font-size: 30px; font-weight: 900; line-height: 1; box-shadow: 0 0 0 5px #0f0f12, 0 8px 20px rgba(242, 193, 78, .35); }
.d5-dep span { color: var(--gold); font-weight: 800; }
.d5-dep:active i { transform: scale(.94); }

/* ---------- 5. 홈 ---------- */
.d5-home { display: flex; flex-direction: column; gap: 26px; min-width: 0; color: var(--ink); }
.d5-home img { display: block; max-width: 100%; }
.d5-home a { color: inherit; text-decoration: none; }
.d5-home button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }

/* 큰 배너 */
.d5-hero { position: relative; display: flex; align-items: center; min-height: 300px; padding: 40px 48px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(242, 193, 78, .5); background: radial-gradient(70% 120% at 82% 55%, rgba(242, 193, 78, .32), transparent 62%), radial-gradient(40% 60% at 10% 0%, rgba(242, 193, 78, .12), transparent 70%), linear-gradient(115deg, #0e0c08 0%, #1d1608 55%, #33260a 100%); box-shadow: inset 0 1px 0 rgba(255, 227, 154, .18), 0 18px 40px rgba(0, 0, 0, .55); }
.d5-hero-txt { position: relative; z-index: 2; max-width: 52%; display: flex; flex-direction: column; align-items: flex-start; }
.d5-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(242, 193, 78, .6); background: rgba(242, 193, 78, .1); color: var(--gold-hi); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.d5-h { margin: 14px 0 10px; font-size: 42px; line-height: 1.15; font-weight: 900; letter-spacing: -.03em; color: #fff; }
.d5-h em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.d5-p { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.d5-acts { display: flex; align-items: center; gap: 10px; }
.d5-btn { height: 46px; padding: 0 28px !important; border-radius: 12px; background: var(--gold-grad) !important; color: var(--on-blue) !important; font-weight: 900 !important; font-size: 15px; box-shadow: 0 6px 18px rgba(242, 193, 78, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.d5-btn:hover { filter: brightness(1.07); }
.d5-soc { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); border: 1px solid rgba(242, 193, 78, .45); }
.d5-soc img { width: 24px; height: 24px; }
.d5-soc:hover { border-color: var(--gold); background: rgba(242, 193, 78, .14); }
.d5-hero-art { position: absolute; z-index: 1; right: 3%; top: 0; bottom: 0; width: 46%; display: flex; align-items: flex-end; justify-content: center; }
.d5-hero-art img { position: absolute; bottom: 0; aspect-ratio: 1; object-fit: cover; border-radius: 22px 22px 0 0; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.d5-hero-art .is-c { z-index: 2; height: 96%; left: 50%; transform: translateX(-50%); box-shadow: 0 0 0 2px rgba(242, 193, 78, .55), 0 0 40px rgba(242, 193, 78, .25); }
.d5-hero-art .is-l, .d5-hero-art .is-r { height: 72%; opacity: .8; filter: saturate(.85) brightness(.8); }
.d5-hero-art .is-l { left: 0; }
.d5-hero-art .is-r { right: 0; }
/* 관리자 메인 배너 그림 */
.d5-hero.is-pics { padding: 0; display: block; height: 300px; min-height: 0; }
.d5-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.d5-slide { flex: 0 0 100%; height: 100%; }
.d5-pic { display: block; width: 100%; height: 100%; }
.d5-pic picture, .d5-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.d5-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.d5-dots button { width: 8px; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, .35) !important; transition: width .2s; }
.d5-dots button[aria-pressed="true"] { width: 26px; background: var(--gold) !important; }

/* 아이콘 줄 */
.d5-icons { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; }
.d5-ic { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center; }
.d5-ic-pic { width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: #1a1c20; border: 1px solid #2a2a31; transition: border-color .15s, transform .15s, box-shadow .15s; }
.d5-ic-pic img { width: 100%; height: 100%; object-fit: cover; }
.d5-ic:hover .d5-ic-pic { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(242, 193, 78, .18); }
.d5-ic:hover { color: var(--gold-hi); }

/* 카지노 · 슬롯 큰 카드 (메인시안-10: 스포츠 → 슬롯 · 파랑 그대로) */
.d5-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.d5-big { position: relative; display: flex; align-items: center; height: 200px; padding: 0 36px; border-radius: 20px; overflow: hidden; isolation: isolate; }
.d5-big.is-casino { background: radial-gradient(70% 110% at 85% 50%, rgba(255, 255, 255, .35), transparent 60%), linear-gradient(120deg, #ffe39a 0%, #f2c14e 40%, #b8860b 100%); color: #1a1305; clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%); }
.d5-big.is-slot { background: radial-gradient(70% 110% at 85% 50%, rgba(120, 170, 255, .45), transparent 60%), linear-gradient(120deg, #3b78ff 0%, #1f47c8 50%, #0d1f63 100%); color: #fff; clip-path: polygon(5% 0, 100% 0, 100% 100%, 0 100%); padding-left: 56px; }
.d5-big-t { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.d5-big-t small { font-size: 12px; font-weight: 900; letter-spacing: .14em; opacity: .75; }
.d5-big-t b { font-size: 38px; font-weight: 900; letter-spacing: .02em; line-height: 1.1; }
.d5-big-t > span { font-size: 13px; font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; }
.d5-go { margin-top: 12px; font-style: normal; height: 38px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 10px; font-size: 13.5px; font-weight: 900; }
.is-casino .d5-go { background: #1a1305; color: var(--gold-hi); }
.is-slot .d5-go { background: #fff; color: #1f47c8; }
.d5-big > img { position: absolute; z-index: 1; right: 2%; top: 50%; height: 130%; transform: translateY(-50%); aspect-ratio: 1; object-fit: cover; -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); transition: transform .3s; }
.d5-big:hover > img { transform: translateY(-50%) scale(1.05) rotate(-2deg); }

/* TOP 10 줄 (메인시안-10: 순위 숫자 없이 · 게임 그림만) */
.d5-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-width: 0; }
.d5-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.d5-head small { color: var(--ink-3); font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d5-sp { flex: 1; }
.d5-more { height: 32px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(242, 193, 78, .5); color: var(--gold) !important; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.d5-more:hover { background: rgba(242, 193, 78, .12); }
.d5-arr { display: flex; gap: 6px; }
.d5-arr button { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #19191d !important; border: 1px solid #2a2a31 !important; font-size: 17px; font-weight: 900; }
.d5-arr button:hover { border-color: var(--gold) !important; color: var(--gold); }
.d5-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px; }
.d5-rail::-webkit-scrollbar { display: none; }
.d5-ti { position: relative; flex: 0 0 auto; display: flex; align-items: flex-end; scroll-snap-align: start; }
.d5-cv { position: relative; z-index: 1; width: 148px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #19191d; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); transition: transform .2s, box-shadow .2s; }
.d5-cv img { width: 100%; height: 100%; object-fit: cover; }
.d5-art { display: grid; place-items: center; width: 100%; height: 100%; padding: 8px; font-style: normal; font-size: 12px; font-weight: 800; text-align: center; color: #fff; }
.d5-ti:hover .d5-cv { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--gold), 0 10px 22px rgba(0, 0, 0, .5); }
.d5-empty { margin: 0; color: var(--ink-3); font-size: 13px; }

/* 게임 제공사 (원래 줄 그대로 · 색만) */
.d5-home ~ .sec .prov { background: #151518; border-color: #26262d; }
.d5-home ~ .sec .prov:hover { border-color: var(--gold); }

/* 실시간 당첨 */
.d5-wins { padding: 18px 20px 8px; border-radius: 18px; background: #121215; border: 1px solid #24242b; scroll-margin-top: calc(var(--header-h) + 12px); }
.d5-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint-500); box-shadow: 0 0 0 4px rgba(62, 211, 138, .18); animation: d5pulse 1.6s ease-in-out infinite; }
@keyframes d5pulse { 50% { box-shadow: 0 0 0 8px rgba(62, 211, 138, 0); } }
.d5-wt { display: flex; flex-direction: column; }
.d5-wr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 70px minmax(0, 1.1fr); align-items: center; gap: 10px; min-height: 50px; padding: 0 10px; border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.d5-wr:nth-child(even) { background: #17171b; }
.d5-wr.is-head { min-height: 34px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); background: none; }
.d5-wr > span:nth-child(n + 3) { text-align: right; font-variant-numeric: tabular-nums; }
.d5-wg { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d5-wg img, .d5-wg i { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; background: #26262c; }
.d5-wg b { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d5-wu { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d5-wa { color: var(--gold); font-weight: 900; }
a.d5-wr:hover { background: #1f1f24; }

/* ---------- 6. 화면 폭별 ---------- */
@media (max-width: 1279px) {
  .d5-icons { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .d5-h { font-size: 36px; }
}
@media (max-width: 1023px) {
  .d5-home { gap: 20px; }
  .d5-hero { flex-direction: column; align-items: stretch; min-height: 0; padding: 22px 18px 0; }
  .d5-hero-txt { max-width: none; }
  .d5-h { font-size: 27px; margin: 10px 0 6px; }
  .d5-p { font-size: 13px; margin-bottom: 14px; }
  .d5-btn { height: 42px; padding: 0 20px !important; font-size: 14px; }
  .d5-soc { width: 42px; height: 42px; }
  .d5-hero-art { position: relative; right: auto; width: 100%; height: 170px; margin-top: 14px; }
  .d5-hero-art .is-c { height: 100%; }
  .d5-hero-art .is-l { left: 6%; }
  .d5-hero-art .is-r { right: 6%; }
  .d5-hero.is-pics { height: auto; aspect-ratio: 16 / 9; padding: 0; }
  .d5-icons { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .d5-icons::-webkit-scrollbar { display: none; }
  .d5-ic { flex: 0 0 68px; font-size: 12px; gap: 6px; }
  .d5-ic-pic { border-radius: 16px; }
  .d5-duo { gap: 10px; }
  .d5-big { height: 132px; padding: 0 14px; border-radius: 16px; align-items: flex-start; padding-top: 16px; }
  .d5-big.is-slot { padding-left: 22px; }
  .d5-big-t b { font-size: 22px; }
  .d5-big-t small { font-size: 9.5px; letter-spacing: .08em; }
  .d5-big-t > span { display: none; }
  .d5-go { margin-top: 10px; height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
  .d5-big > img { height: 104%; right: -14%; top: 62%; }
  .d5-head h2 { font-size: 17px; }
  .d5-head small { display: none; }
  .d5-rail { margin: 0 -16px; padding: 4px 16px; scroll-padding-inline: 16px; }
  .d5-rail { gap: 10px; }
  .d5-cv { width: 104px; border-radius: 10px; }
  .d5-wins { padding: 14px 10px 6px; }
  .d5-wr { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 0 6px; font-size: 12px; }
  .d5-wr > .d5-wx { display: none; }
  .d5-wr.is-head > span:nth-child(3) { display: none; }
  .d5-wg img, .d5-wg i { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .d5-track, .d5-cv, .d5-ic-pic, .d5-big > img { transition: none; }
  .d5-dot { animation: none; }
}
