/* v2: 외부 NanumSquareRound @import 제거 — jsdelivr gh 경로가 차단(ORB)돼 v1 에서도 한 번도 로드되지 않았다(화면 영향 없음) */
/* dev4-64393-yt-overlay: 유튜브카지노(youca015.com) 시안 적용
 * 원본 daebbang 마크업 유지 + 시각 오버라이드
 * body[data-yt-theme="1"] 활성 */

@font-face { font-family: "Pretendard"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/packages/pretendard/dist/web/static/woff2/Pretendard-Regular.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/packages/pretendard/dist/web/static/woff2/Pretendard-Bold.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 900; font-style: normal; font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/packages/pretendard/dist/web/static/woff2/Pretendard-Black.woff2") format("woff2"); }

body[data-yt-theme="1"] {
  --yt-red: #ff0000;
  --yt-red-hover: #d90000;
  --yt-bg: #ffffff;
  --yt-fg: #111111;
  --yt-muted: #6b7280;
  --yt-border: #e5e7eb;
  --yt-sidebar-w: 210px;
  --yt-header-h: 120px;
  --yt-font: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;

  background: var(--yt-bg) !important;
  color: var(--yt-fg) !important;
  font-family: var(--yt-font) !important;
}
body[data-yt-theme="1"] *:not(i):not([class*="ri-"]):not(svg):not(svg *) { font-family: var(--yt-font) !important; }
body[data-yt-theme="1"] i[class*="ri-"] { font-family: "remixicon" !important; font-style: normal; font-weight: normal; }

/* 기존 헤더/메뉴 전체 감춤 (yt-header/yt-sidebar 로 대체) */
body[data-yt-theme="1"] .header-section,
body[data-yt-theme="1"] .header-main,
body[data-yt-theme="1"] .header-menu { display: none !important; }

/* wrapper 재구성: shell 위 header + shell 안 sidebar+content */
body[data-yt-theme="1"] .wrapper { background: var(--yt-bg) !important; padding-top: var(--yt-header-h) !important; padding-left: var(--yt-sidebar-w) !important; }

/* ============ 상단 헤더 ============ */
.yt-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--yt-header-h);
  background: #fff; border-bottom: 1px solid var(--yt-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; z-index: 1000; font-family: var(--yt-font);
}
.yt-header-left { display: flex; align-items: center; gap: 14px; }
.yt-header-left .yt-menu-btn {
  width: 40px; height: 40px; display: none; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: #111;
}
.yt-header-logo { display: flex; align-items: center; height: 40px; }
.yt-header-logo img { height: auto; width: 300px; max-height: 120px; object-fit: contain; }
.yt-header-search {
  flex: 1; max-width: 480px; margin: 0 auto;
  display: flex; align-items: center;
  background: #fff; border: 1px solid var(--yt-border); border-radius: 22px;
  padding: 6px 12px 6px 18px; height: 40px;
}
.yt-header-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--yt-font); font-size: 14px; color: var(--yt-fg);
}
.yt-header-search .yt-search-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: #6b7280; }
.yt-header-right { display: flex; align-items: center; gap: 10px; }
.yt-header-right .yt-btn {
  height: 40px; padding: 0 18px; border-radius: 22px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--yt-font); font-weight: 700; font-size: 14px;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none; white-space: nowrap;
}
.yt-btn-login { background: var(--yt-red); color: #fff; border: 1px solid var(--yt-red); }
.yt-btn-login:hover { background: var(--yt-red-hover); border-color: var(--yt-red-hover); color: #fff; }
.yt-btn-outline { background: #fff; color: #111; border: 1.5px solid var(--yt-border); }
.yt-btn-outline:hover { background: #f5f5f5; }
.yt-btn i, .yt-btn svg { width: 16px; height: 16px; }

/* 로그인 상태 유저정보 박스 */
.yt-user-box {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border: 1px solid var(--yt-border); border-radius: 22px;
  background: #fafafa; font-family: var(--yt-font); font-size: 13px; color: #111;
}
.yt-user-box .yt-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; }
.yt-user-box .yt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.yt-user-box .yt-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.yt-user-box .yt-user-info .yt-uname { font-weight: 700; }
.yt-user-box .yt-user-info .yt-ubal { color: var(--yt-muted); font-size: 12px; }

/* ============ 좌측 세로 사이드바 ============ */
.yt-sidebar {
  position: fixed; top: var(--yt-header-h); left: 0; bottom: 0;
  width: var(--yt-sidebar-w); background: #fff; border-right: 1px solid var(--yt-border);
  padding: 12px 0 24px; overflow-y: auto; z-index: 900; font-family: var(--yt-font);
}
.yt-sidebar::-webkit-scrollbar { width: 8px; }
.yt-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.yt-sidebar a {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 22px; color: #111; text-decoration: none;
  font-family: var(--yt-font); font-size: 14px; font-weight: 500;
  transition: background 0.12s;
}
.yt-sidebar a:hover { background: #f0f0f0; color: #111; }
.yt-sidebar a i, .yt-sidebar a svg { width: 22px; height: 22px; font-size: 22px; color: #111; flex-shrink: 0; }
.yt-sidebar hr { border: none; border-top: 1px solid var(--yt-border); margin: 8px 22px; }
.yt-sidebar .yt-section-title {
  padding: 14px 22px 8px; font-family: var(--yt-font);
  font-size: 15px; font-weight: 700; color: #111;
}
.yt-sidebar a.yt-brand-link { padding: 10px 22px; }
.yt-sidebar a.yt-brand-link i { color: var(--yt-red); }

/* ============ 콘텐츠 영역 (기존 마크업 재활용) ============ */
body[data-yt-theme="1"] .container { max-width: 100% !important; padding: 0 24px !important; }
body[data-yt-theme="1"] .content-wrap,
body[data-yt-theme="1"] .content-section { background: var(--yt-bg) !important; color: var(--yt-fg) !important; }

/* 게임 카드 밝은 톤 */
body[data-yt-theme="1"] .toggle-section,
body[data-yt-theme="1"] .toggle-btn { background: transparent !important; color: var(--yt-fg) !important; }
body[data-yt-theme="1"] .toggle-btn { border: 1px solid var(--yt-border) !important; border-radius: 12px !important; overflow: hidden !important; position: relative !important; }
body[data-yt-theme="1"] .toggle-btn:hover { border-color: var(--yt-red) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; }

/* dev4-64547: 메인 슬롯/카지노 카드 — ::before radial-gradient + .g-hover linear-gradient
 * 를 빨강+블랙 그라디언트로 오버라이드 (캐릭터 이미지는 그대로 유지) */
body[data-yt-theme="1"] .main-toggle .toggle-btn.slot-link::before,
body[data-yt-theme="1"] .main-toggle .toggle-btn.casino-link::before {
  background: radial-gradient(83.11% 43.5% at 6.07% 0%, #ff0000 0%, #200000 100%) !important;
}

/* dev4-65195: 모바일 - PC 스타일 그대로 적용 */
@media (max-width: 767px) {
  body[data-yt-theme="1"] .main-toggle .toggle-btn.slot-link::before,
  body[data-yt-theme="1"] .main-toggle .toggle-btn.casino-link::before {
    display: block !important;
  }
  body[data-yt-theme="1"] .main-toggle .toggle-btn.slot-link,
  body[data-yt-theme="1"] .main-toggle .toggle-btn.casino-link {
    background: transparent !important;
  }
  /* dev4-65218: 모바일에서 잭팟 숨김 + 검색창을 슬롯게임 카드 바로 위 */
  body[data-yt-theme="1"] .jackpot-section { display: none !important; }
  /* dev4-65400: 모바일 검색창을 헤더 로고 옆 아이콘 형태로 (input 감춤, 검색 아이콘만) */
  body[data-yt-theme="1"] .yt-header-search {
    position: static !important;
    order: 2 !important;
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    margin: 0 0 0 12px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }
  body[data-yt-theme="1"] .yt-header-search input { display: none !important; }
  body[data-yt-theme="1"] .yt-header-search .yt-search-icon {
    width: 32px !important; height: 32px !important;
    color: #111 !important;
  }
  body[data-yt-theme="1"] .yt-header-search .yt-search-icon svg {
    width: 24px !important; height: 24px !important;
  }
  body[data-yt-theme="1"] .yt-header-left { flex: 0 0 auto !important; }
  body[data-yt-theme="1"] .yt-header { justify-content: flex-start !important; padding: 0 8px !important; height: 56px !important; }
  body[data-yt-theme="1"] .yt-header-right { margin-left: auto !important; order: 4 !important; }
  /* dev4-65409/65416: 검색 아이콘 로그인 바로 옆 밀착 (우측으로 밀착) */
  body[data-yt-theme="1"] .yt-header-search {
    order: 3 !important;
    margin: 0 !important;
    margin-left: auto !important;
  }
  body[data-yt-theme="1"] .yt-header-right {
    order: 4 !important;
    margin-left: 0 !important;
  }
  /* 로고와 햄버거 사이 여백 축소 */
  body[data-yt-theme="1"] .yt-header-left { gap: 4px !important; }
  body[data-yt-theme="1"] .yt-header-logo { margin-left: 0 !important; padding-left: 0 !important; }
  /* 우측 검색+로그인 밀착 */
  body[data-yt-theme="1"] .yt-header-right { gap: 4px !important; }
  /* 모바일 로고 크기 확대 */
  body[data-yt-theme="1"] .yt-header-logo { height: 48px !important; }
  body[data-yt-theme="1"] .yt-header-logo img {
    width: 150px !important; max-height: 48px !important; height: auto !important;
  }
  body[data-yt-theme="1"] .yt-header { height: 64px !important; }
  body[data-yt-theme="1"] .wrapper { padding-top: 64px !important; }
  /* 모바일 우측 3버튼 축소 */
  body[data-yt-theme="1"] .yt-header-right .yt-btn { padding: 0 8px !important; font-size: 11px !important; height: 32px !important; }
  body[data-yt-theme="1"] .yt-header-right .yt-btn svg { display: none !important; }
  body[data-yt-theme="1"] .yt-header-right .yt-btn-outline { display: none !important; }
  /* wrapper 헤더 여유 */
  body[data-yt-theme="1"] .wrapper { padding-top: 56px !important; }
}

/* dev4-65203: 슬롯게임 반전 원복 */
/* dev4-65198: PC hover 규칙이 @media(min-width:1025px) 안에 갇혀 있어 모바일에선 hover 안 됨 → 우회 */
body[data-yt-theme="1"] .main-toggle .toggle-btn:hover .g-hover,
body[data-yt-theme="1"] .main-toggle .toggle-btn:active .g-hover {
  opacity: 1 !important;
}
body[data-yt-theme="1"] .main-toggle .toggle-btn.slot-link .g-hover,
body[data-yt-theme="1"] .main-toggle .toggle-btn.casino-link .g-hover {
  background: linear-gradient(to right, #200000, #cc0000) !important;
}
/* dev4-64557: 호버 시 .g-hover::before 초록 그라디언트 → 레드 */
body[data-yt-theme="1"] .main-toggle .toggle-btn.slot-link .g-hover::before,
body[data-yt-theme="1"] .main-toggle .toggle-btn.casino-link .g-hover::before {
  background: linear-gradient(to left, #ff0000, #ff0000, rgba(0, 0, 0, 0)) !important;
}
body[data-yt-theme="1"] .main-toggle .toggle-btn.slot-link .g-hover::after,
body[data-yt-theme="1"] .main-toggle .toggle-btn.casino-link .g-hover::after {
  background: linear-gradient(to right, #ff0000, #ff0000, rgba(0, 0, 0, 0)) !important;
}

/* dev4-64894/65208: 카드 메인 제목 텍스트 흰색 + 진한 그림자 */
body[data-yt-theme="1"] .main-toggle .toggle-btn .kr-text {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 1) !important;
}
/* dev4-65205: 영어 텍스트 (en-text) 골드 그라디언트 + 진한 그림자 */
body[data-yt-theme="1"] .main-toggle .toggle-btn .en-text {
  background: linear-gradient(180deg, #ffe58a 0%, #f5c542 45%, #d4a017 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.9)) !important;
  text-shadow: none !important;
}

/* dev4-64895: 카드 중앙 로고를 새 유튜브 로고로 교체 */
body[data-yt-theme="1"] .main-toggle .toggle-divider img {
  content: url("/assets/client/themes/daebbang/images/yt_center_logo.png") !important;
  max-height: 80px !important;
  width: auto !important;
}

/* dev4-65211: 실시간 당첨/충전/환전 리스트 전체 숨김 */
body[data-yt-theme="1"] .realtime-section,
body[data-yt-theme="1"] .realtime-wrap { display: none !important; }

/* dev4-65442: 이벤트/공지사항 박스 뒷배경 완전 블랙 */
body[data-yt-theme="1"] .board-section,
body[data-yt-theme="1"] .board-wrap {
  background: #000000 !important;
}
body[data-yt-theme="1"] .eveter-wrap { background: transparent !important; }

/* dev4-65439: 이벤트/공지사항 박스 헤더 = 레드+블랙 그라디언트, 아이콘/텍스트 흰색 */
body[data-yt-theme="1"] .eveter-wrap .nt-board .header {
  background: linear-gradient(90deg, #ff0000 0%, #a00000 45%, #200000 100%) !important;
  padding: 12px 16px !important;
  border-radius: 12px 12px 0 0 !important;
}
body[data-yt-theme="1"] .eveter-wrap .nt-board .header .title-panel,
body[data-yt-theme="1"] .eveter-wrap .nt-board .header .title-panel *,
body[data-yt-theme="1"] .eveter-wrap .nt-board .header .more-link,
body[data-yt-theme="1"] .eveter-wrap .nt-board .header .more-link * {
  color: #ffffff !important;
}
body[data-yt-theme="1"] .eveter-wrap .nt-board .header i {
  color: #ffffff !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* dev4-65040: rt-board::before box-shadow 옅은 그린(#66dfac) → 옅은 레드 */
body[data-yt-theme="1"] .rt-board::before {
  box-shadow: 0 0 200px #ff9999 !important;
}
/* dev4-65063: rt-board::after border 그린(#0b995d) → 레드 */
body[data-yt-theme="1"] .rt-board::after {
  border: solid 1px #ff0000 !important;
}

/* dev4-65134: 박스 헤더 텍스트 폰트 = 나눔스퀘어 */
body[data-yt-theme="1"] .rt-board .header,
body[data-yt-theme="1"] .rt-board .header * {
  font-family: "NanumSquareRound", "NanumSquare", "Nanum Gothic", sans-serif !important;
  font-weight: 900 !important;
}

/* dev4-65082: 「충전」 텍스트 = #35fea8 민트 그린 */
body[data-yt-theme="1"] .rt-board .text-gradient-b {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #35fea8 !important;
  color: #35fea8 !important;
}
/* dev4-65086: 「환전」 텍스트 = 단색 레드 */
body[data-yt-theme="1"] .rt-board .text-gradient-r {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ff0000 !important;
  color: #ff0000 !important;
}

/* dev4-64974: 실시간 당첨 리스트 카드 배경 레드+블랙 그라디언트, dev4-65002: 글로우 은은하게 */
body[data-yt-theme="1"] .winner-btn {
  background: radial-gradient(circle at 50% 0%, rgba(255, 40, 40, 0.18), rgba(0, 0, 0, 0) 70%), linear-gradient(#3a0000, #000000) !important;
  border: 1px solid rgba(255, 0, 0, 0.25) !important;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.15) !important;
}
body[data-yt-theme="1"] .winner-btn:hover {
  background: radial-gradient(circle at 50% 0%, rgba(255, 60, 60, 0.28), rgba(0, 0, 0, 0) 70%), linear-gradient(#5a0000, #200000) !important;
  border-color: rgba(255, 0, 0, 0.5) !important;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3) !important;
}

/* 텍스트 컬러 강제 */
body[data-yt-theme="1"] h1,
body[data-yt-theme="1"] h2,
body[data-yt-theme="1"] h3,
body[data-yt-theme="1"] h4,
body[data-yt-theme="1"] h5,
body[data-yt-theme="1"] h6 { color: var(--yt-fg) !important; }
body[data-yt-theme="1"] p, body[data-yt-theme="1"] span, body[data-yt-theme="1"] div { color: inherit; }

/* dev4-64927: 실시간 잭팟 배너 — 빨강+블랙+화이트 3색 그라디언트 */
body[data-yt-theme="1"] .jackpot-panel {
  background: linear-gradient(90deg, #ffffff 0%, #000000 45%, #cc0000 75%, #ff0000 100%) !important;
  border: 3px solid #ff0000 !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
/* .jackpot-panel::before 가 다크 그린 배경을 덮고 있음 → 감춤 */
body[data-yt-theme="1"] .jackpot-panel::before,
body[data-yt-theme="1"] .jackpot-panel::after {
  background: transparent !important;
  display: none !important;
}
/* 금액/텍스트 판 z-index 최상단 + overflow visible 로 숫자 잘림 방지 */
body[data-yt-theme="1"] .jackpot-panel {
  position: relative !important;
  overflow: visible !important;
}
body[data-yt-theme="1"] .jackpot-panel .label-panel,
body[data-yt-theme="1"] .jackpot-panel .amount-panel {
  position: relative !important;
  z-index: 10 !important;
}
body[data-yt-theme="1"] .jackpot-panel .amount-panel { overflow: visible !important; }
body[data-yt-theme="1"] .jackpot-panel .amount.odometer,
body[data-yt-theme="1"] .jackpot-panel .odometer-inside { overflow: visible !important; }
body[data-yt-theme="1"] .jackpot-panel .glow-bg,
body[data-yt-theme="1"] .jackpot-panel .side-bg {
  background: transparent !important;
  opacity: 0 !important;
}
body[data-yt-theme="1"] .jackpot-panel .font-black.text-yellow {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)) !important;
}
body[data-yt-theme="1"] .jackpot-panel .amount.odometer,
body[data-yt-theme="1"] .jackpot-panel .odometer-value,
body[data-yt-theme="1"] .jackpot-panel .odometer-digit,
body[data-yt-theme="1"] .jackpot-panel .odometer-inside {
  color: #111111 !important;
  text-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff, 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}
body[data-yt-theme="1"] .jackpot-panel .symbol.text-red,
body[data-yt-theme="1"] .jackpot-panel .won {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* ============ 반응형 ============ */
@media (max-width: 900px) {
  body[data-yt-theme="1"] { --yt-sidebar-w: 0px; }
  body[data-yt-theme="1"] .wrapper { padding-left: 0 !important; }
  .yt-sidebar { transform: translateX(-100%); transition: transform 0.2s; width: 210px !important; }
  body[data-yt-theme="1"][data-yt-menu="1"] .yt-sidebar { transform: translateX(0); box-shadow: 4px 0 16px rgba(0,0,0,0.15); }
  .yt-header-left .yt-menu-btn { display: flex; }
  .yt-header-search { max-width: none; }
  .yt-header-right .yt-btn { padding: 0 10px; font-size: 12px; }
}
