﻿body {
  background:
    radial-gradient(ellipse at 20% 10%, #2a1b3a 0%, transparent 20%),
    radial-gradient(ellipse at 80% 90%, #2a1b3a 0%, transparent 18%),
    linear-gradient(180deg, #0b0b10 0%, #121018 60%, #1a1422 100%);
  margin: 0;
  font-family: Arial, sans-serif;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   Homepage v1.1 Theme Override
   ========================= */
:root {
  --home-header-bar-h: 56px;
  --home-header-banner-h: 260px;
  --home-header-strip-h: 24px;
  --home-header-total-h: 340px;
  --home-footer-h: 86px;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  background-color: #10131b !important;
  background-image: url("../images/image_v1.1/BG_Pattern_01.png") !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  color: #ecf1ff !important;
  font-family:
    "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif !important;
  overflow-x: hidden;
}

#uiTopBar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--home-header-bar-h);
  background: url("../images/image_v1.1/UI_Header_Bar_01.png") center / cover
    no-repeat;
  z-index: 340;
}

#uiTopBar .top-brand-mark {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 40px;
  height: 40px;
  background: url("../images/image_v1.1/favicon.ico") center / contain no-repeat;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

#uiHeaderBanner {
  position: fixed;
  top: var(--home-header-bar-h);
  left: 0;
  right: 0;
  height: var(--home-header-banner-h);
  background: url("../images/image_v1.1/UI_Header_Banner_01.png") center / cover
    no-repeat;
  z-index: 330;
}

#uiHeaderStrip {
  position: fixed;
  top: calc(var(--home-header-bar-h) + var(--home-header-banner-h));
  left: 0;
  right: 0;
  height: var(--home-header-strip-h);
  background: url("../images/image_v1.1/UI_Header_Bar_02.png") center / cover
    no-repeat;
  z-index: 320;
}

#loginBgAnim {
  display: none !important;
}

#loginSection,
#gameSection {
  position: relative;
  width: 100% !important;
  max-width: 1600px !important;
  margin: var(--home-header-total-h) auto 0 !important;
  padding: 14px 16px calc(var(--home-footer-h) + 14px) !important;
  /* z-index 제거: 스태킹 컨텍스트가 생성되면 내부 .user-section(fixed,z-index:360)이 #uiTopBar(z-index:340) 뒤에 가려짐 */
}

#gameSection {
  display: none;
}

#gameSection.container,
#gameSection > .container {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* Login */
.login-layout {
  position: relative;
  min-height: calc(100vh - var(--home-header-total-h) - var(--home-footer-h));
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px;
}

.login-layout::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 66px;
  width: min(460px, 48vw);
  aspect-ratio: 514 / 1232;
  transform: translateX(-50%);
  background: url("../images/image_v1.1/BG_Image_01.png") center / contain
    no-repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.login-message-block {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 18px;
}

.login-main-copy {
  margin: 0;
  color: #f0d87a;
  font-size: clamp(26px, 2vw, 42px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.login-sub-copy {
  margin: 6px 0 0;
  color: #ff8f8f;
  font-size: clamp(13px, 0.92vw, 18px);
  font-weight: 700;
}

.login-card {
  position: relative !important;
  z-index: 2;
  width: min(450px, 94vw) !important;
  padding: 0 !important;
  margin: 0 auto !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#loginForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-card #errorMessage {
  width: min(434px, 94vw);
}

.login-card .loading {
  width: min(434px, 94vw);
  text-align: center;
  color: #ecf3ff;
  font-weight: 700;
  font-size: 14px;
}

.login-card input {
  width: min(434px, 94vw) !important;
  height: auto;
  aspect-ratio: 434 / 82;
  margin: 0 !important;
  padding: 0 22px !important;
  border: none !important;
  border-radius: 41px !important;
  background: url("../images/image_v1.1/Login_Secssion/Login_Input_Field.png")
    center / 100% 100% no-repeat !important;
  color: rgba(220, 234, 255, 0.98) !important;
  font-size: clamp(17px, 1.55vw, 30px) !important;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: none !important;
}

.login-card input::placeholder {
  color: rgba(98, 107, 128, 0.58);
}

.login-card input:focus {
  outline: none;
  filter: brightness(1.06);
}

.login-card .form-check {
  display: none !important;
}

.login-actions {
  width: min(434px, 94vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.login-card .login-btn {
  width: min(434px, 94vw) !important;
  height: auto;
  aspect-ratio: 434 / 88;
  border: none !important;
  border-radius: 44px !important;
  background: url("../images/image_v1.1/Login_Secssion/Butn_Login.png") center /
    100% 100% no-repeat !important;
  color: #dcecff;
  font-size: clamp(24px, 2.25vw, 45px);
  font-weight: 900;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  box-shadow: none !important;
}

.login-card .login-btn:hover {
  transform: none !important;
  filter: brightness(1.05);
}

.login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
  font-size: clamp(12px, 0.95vw, 17px);
}

.login-card .register-btn {
  width: auto !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #f3f6ff !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 500;
  font-size: inherit;
}

.login-card .register-btn:hover {
  transform: none !important;
  text-decoration: underline;
}

.login-links .divider {
  color: rgba(236, 243, 255, 0.68);
}

.find-account-link {
  color: #f3f6ff;
  text-decoration: none;
  font-weight: 500;
}

.find-account-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Top game user bar */
.user-section {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  height: var(--home-header-bar-h);
  background: transparent !important;
  box-shadow: none !important;
  z-index: 360;
}

.user-section-content {
  width: min(1700px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 12px 0 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#userInfo {
  width: 240px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px 0 42px;
  margin: 0;
  background: url("../images/image_v1.1/Game_Secssion/UI_MyInfo_Nickname_01.png")
    center / 100% 100% no-repeat;
  color: #f5f7ff;
  font-size: clamp(12px, 0.9vw, 17px);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

#userInfo .user-icon {
  display: none;
}

#userInfo .user-text {
  width: 100%;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}

#userMoney,
#userWallet {
  width: 270px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 0 52px;
  margin: 0;
  font-size: clamp(16px, 1.5vw, 31px);
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

#userMoney {
  background: url("../images/image_v1.1/Game_Secssion/UI_MyInfo_Points_01.png")
    center / 100% 100% no-repeat;
  color: #ffe983;
}

#userWallet {
  background: url("../images/image_v1.1/Game_Secssion/UI_MyInfo_Wallet_01.png")
    center / 100% 100% no-repeat;
  color: #6fff8d;
}

.wallet-btn,
.logout-btn {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background-position: center !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}

#depositBtn {
  width: 64px;
  height: 32px;
  background-image: url("../images/image_v1.1/Game_Secssion/Btn_Deposit.png") !important;
}

#withdrawBtn {
  width: 64px;
  height: 32px;
  background-image: url("../images/image_v1.1/Game_Secssion/Btn_Withdraw.png") !important;
}

#itemBtn {
  width: 148px;
  height: 50px;
  margin-left: 8px !important;
  background-image: url("../images/image_v1.1/Game_Secssion/Btn_Item.png") !important;
}

#logoutButton {
  width: 148px;
  height: 50px;
  background-image: url("../images/image_v1.1/Game_Secssion/Btn_LogOut.png") !important;
  background: rgba(255, 255, 255, 0);
}

#depositBtn:hover,
#withdrawBtn:hover,
#itemBtn:hover,
#logoutButton:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* Game list area */
.game-grid {
  position: relative;
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 6px 0 0;
}

.game-grid::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 50%;
  width: min(440px, 44vw);
  aspect-ratio: 514 / 1232;
  transform: translateX(-50%);
  background: url("../images/image_v1.1/BG_Image_01.png") center / contain
    no-repeat;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

.game-group {
  position: relative;
  z-index: 1;
}

.game-group-title {
  margin: 0 0 14px;
  text-align: center;
  color: #f4dc88;
  font-size: clamp(30px, 2.2vw, 46px);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.card_game_list,
.slot_game_list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card_game_list {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.card_game_list .game_button {
  width: min(640px, 78vw);
  max-width: 640px;
  aspect-ratio: 640 / 232;
  border-radius: 14px;
  border: none;
}

.slot_game_list {
  max-width: 1580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 304px));
  justify-content: center;
  gap: 12px;
}

.slot_game_list .game_button {
  width: 100%;
  aspect-ratio: 304 / 232;
  border-radius: 14px;
  border: none;
}

.game_button {
  display: block;
  cursor: pointer;
  transition: transform 0.16s ease;
}

.game_button:hover {
  transform: translateY(-2px);
}

.game_label,
.game-dot {
  display: none !important;
}

#loginSection,
#gameSection {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loginSection {
  padding: 20px;
}

#gameSection {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.login-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.03)
  );
  padding: 28px 26px;
  border-radius: 16px;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
  width: 360px;
  text-align: center;
  margin: 0 auto;
  backdrop-filter: blur(6px);
  position: relative;
}

.login-card input {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  transition:
    box-shadow 180ms ease,
    transform 120ms ease,
    border-color 120ms ease;
}

.login-card input#userPw {
  color: #000;
}

.login-card .login-btn {
  background: linear-gradient(90deg, #ffd86a, #ffb84d);
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 140px;
  box-shadow: 0 6px 18px rgba(255, 91, 91, 0.24);
}

.login-card .login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 91, 91, 0.32);
}

.login-card .register-btn {
  background: linear-gradient(90deg, #2bd9ff, #0077ff);
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 140px;
  box-shadow: 0 6px 18px rgba(0, 123, 255, 0.18);
}

.login-card .register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 123, 255, 0.28);
}

.login-card .d-flex {
  gap: 24px; /* 버튼 �?간격 조정 */
}

/* 로그??카드 ?�코: ???�래 빛나?????�티???�과) */
.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(32px);
  opacity: 0.12;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.login-card::before {
  top: -90px;
  background: radial-gradient(circle at 30% 30%, #4da6ff, transparent 40%);
}
.login-card::after {
  bottom: -110px;
  background: radial-gradient(circle at 70% 70%, #ff6b6b, transparent 40%);
}
/* subtle gold top accent */
.login-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  background: linear-gradient(90deg, #ffd86a, #ffb84d);
  box-shadow: 0 6px 18px rgba(255, 180, 70, 0.08);
}

/* ?�력 ?�커??강조 */
.login-card input:focus {
  box-shadow:
    0 6px 20px rgba(0, 123, 255, 0.12) inset,
    0 6px 18px rgba(77, 166, 255, 0.06);
  border-color: rgba(77, 166, 255, 0.9);
  outline: none;
  transform: translateY(-2px);
}

/* 버튼 ?�니메이??그로??*/
.login-card .login-btn,
.login-card .register-btn {
  transition:
    transform 160ms ease,
    box-shadow 200ms ease;
}

/* 로딩 ?�스???��???*/
.loading {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.6px;
}

/* 배경 ?�티??(간단) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 10% 10%,
      rgba(77, 166, 255, 0.06),
      transparent 8%
    ),
    radial-gradient(
      ellipse at 90% 80%,
      rgba(255, 107, 107, 0.06),
      transparent 8%
    );
  z-index: -1;
  pointer-events: none;
}

/* ?��? ?�면 ?�??*/
@media (max-width: 480px) {
  .login-card {
    width: 92%;
    padding: 18px;
  }
  .login-card::before,
  .login-card::after {
    display: none;
  }
  .login-card input {
    font-size: 16px;
  }
  .login-card .login-btn,
  .login-card .register-btn {
    width: 48%;
  }
}

/* particles removed per user request */

#errorMessage {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: none;
}

.login-card input#loginId {
  color: #000;
}

/* 
#loginId {
  color: #000 !important;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  border-radius: 8px;
}
#loginId::placeholder {
  color: rgba(0, 0, 0, 0.45);
}
#loginId:focus {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) inset;
  border-color: rgba(0, 0, 0, 0.18);
  outline: none;
} */

.user-info {
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 700;
  color: #fff;
  padding: 8px 16px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.user-icon {
  width: 20px;
  height: 20px;
  fill: #ff4757;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.user-text {
  display: inline-block;
}

.user-money,
.user-wallet {
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 600;
  margin-left: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.user-money {
  color: #000000;
}

.user-wallet {
  color: #000000;
}

.logout-btn {
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100px;
  font-size: clamp(12px, 1.5vw, 14px);
  transition: all 0.3s ease;
}

/* Wallet / Item button shared styles */
.wallet-btn {
  background: linear-gradient(90deg, #ffd86a, #ffb84d);
  border: none;
  color: #0b0b10;
  padding: 8px 12px;
  margin-left: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: clamp(11px, 1.3vw, 14px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 120ms ease;
}
.wallet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

/* item button ??slightly different accent */
.item-btn {
  background: linear-gradient(90deg, #7bffb3, #00d1ff);
  color: #003046;
  padding: 8px 14px;
}

/* responsive shrink */
@media (max-width: 480px) {
  .wallet-btn,
  .item-btn {
    padding: 6px 8px;
    font-size: 13px;
    margin-left: 6px;
  }
}

/* withdraw button distinct color (overrides .wallet-btn for #withdrawBtn) */
#withdrawBtn {
  background: linear-gradient(90deg, #8e6cff, #d27bff);
  color: #ffffff;
  padding: 8px 14px;
  margin-left: 8px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(142, 108, 255, 0.12);
}
#withdrawBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(142, 108, 255, 0.18);
}

.game-list-header {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 게임 라벨 숨김 */
.game_label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 20px;
  font-family: "Noto Sans KR", sans-serif;
  font-size: clamp(13px, 1.6vw, 18px);
  font-weight: 500;
  letter-spacing: 1px;
  color: #ffd700;
  position: relative;
  transition: all 0.3s ease;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 6px rgba(255, 215, 0, 0.3);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* 게임 구슬 ?�이�?*/
.game-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #ff4757 50%, #d63031);
  box-shadow:
    0 0 8px rgba(255, 71, 87, 0.6),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.game_label::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.1) 0%,
    rgba(255, 237, 78, 0.15) 50%,
    rgba(255, 215, 0, 0.1) 100%
  );
  border-radius: 20px;
  opacity: 0.8;
  z-index: -1;
  filter: blur(6px);
  transition: all 0.3s ease;
}

.game_list li:hover .game_label {
  transform: translateY(-2px);
  color: #ffe55c;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 10px rgba(255, 215, 0, 0.5);
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.game_list li:hover .game-dot {
  transform: scale(1.2);
  box-shadow:
    0 0 12px rgba(255, 71, 87, 0.9),
    inset -1px -1px 2px rgba(0, 0, 0, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle at 30% 30%, #ff8787, #ff6b6b 50%, #ff4757);
}

.game_list li:hover .game_label::before {
  opacity: 1;
  filter: blur(8px);
}

/* 반응??글???�기 조절 */
@media screen and (max-width: 768px) {
  .game_label {
    padding: 6px 14px;
    letter-spacing: 0.8px;
    gap: 6px;
  }

  .game-dot {
    width: 7px;
    height: 7px;
  }

  .user-section-content {
    padding: 5px 10px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .user-info {
    font-size: 12px;
    padding: 6px 12px;
  }

  .user-money,
  .user-wallet {
    margin-left: 6px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .wallet-btn {
    padding: 6px 10px;
    margin-left: 4px;
    font-size: 11px;
  }

  .logout-btn {
    padding: 8px;
    width: 80px;
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .game_label {
    padding: 5px 12px;
    letter-spacing: 0.5px;
    gap: 5px;
  }

  .game-dot {
    width: 6px;
    height: 6px;
  }

  .user-section-content {
    padding: 4px 8px;
  }

  .user-info {
    font-size: 11px;
    padding: 5px 10px;
  }

  .user-money,
  .user-wallet {
    margin-left: 4px;
    padding: 3px 6px;
    font-size: 11px;
  }

  .wallet-btn {
    padding: 5px 8px;
    margin-left: 3px;
    font-size: 10px;
  }

  .logout-btn {
    padding: 6px;
    width: 70px;
    font-size: 11px;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  display: none;
}
.bg-video[style*="display: none"] {
  display: none !important;
}

/* Scope title image inside the wrapper for consistent positioning */
#titleWrap #titleImage {
  position: fixed; /* ?�면 ?�측 ?�단??고정 */
  top: 18px;
  right: 14px;
  /* responsive size: min 96px, preferred 12vw, max 240px */
  width: clamp(96px, 12vw, 240px);
  z-index: 220; /* 배경·비디???? 모달보다 ?�래 */
  pointer-events: none; /* ?�릭 방�? */
  transform-origin: center right;
  transition:
    transform 240ms cubic-bezier(0.2, 0.9, 0.2, 1),
    filter 240ms ease,
    opacity 240ms ease;
  will-change: transform, filter, opacity;
  /* neon color variables for quick tweaks */
  --neon-a: 58, 212, 255; /* cyan */
  --neon-b: 255, 165, 85; /* warm gold */
  --neon-c: 200, 100, 255; /* magenta */
  /* layered drop-shadows give a bright neon halo */
  filter: drop-shadow(0 10px 28px rgba(var(--neon-a), 0.06))
    drop-shadow(0 6px 18px rgba(var(--neon-b), 0.04));
  opacity: 1;
  /* combine float, glow and neon-shift */
  animation:
    logoFloat 6.5s ease-in-out infinite,
    logoGlow 3.6s ease-in-out infinite,
    logoNeon 4.2s linear infinite,
    logoPulse 9s ease-in-out infinite;
}

/* duplicated image tint layer: gold hue + blur + breathing */
#titleWrap .titleTint {
  position: fixed;
  top: 18px;
  right: 14px;
  width: clamp(96px, 12vw, 240px);
  z-index: 210; /* behind the main image but above back */
  pointer-events: none;
  transform-origin: center right;
  filter: blur(8px) saturate(1.12)
    drop-shadow(0 12px 28px rgba(255, 200, 80, 0.14));
  mix-blend-mode: screen;
  opacity: 0.9;
  animation: tintBreath 9s ease-in-out infinite;
}

@keyframes tintBreath {
  0% {
    transform: translateY(0) scale(0.98);
    opacity: 0.82;
    filter: blur(7px) saturate(1.02);
  }
  50% {
    transform: translateY(-4px) scale(1.06);
    opacity: 1;
    filter: blur(10px) saturate(1.18);
  }
  100% {
    transform: translateY(0) scale(0.98);
    opacity: 0.82;
    filter: blur(7px) saturate(1.02);
  }
}

/* hover/tap affordance: slight scale and stronger glow */
#titleImage:hover,
#titleImage:focus {
  transform: translateY(-4px) scale(1.03) rotate(-0.5deg);
  filter: drop-shadow(0 18px 48px rgba(0, 150, 255, 0.16)) saturate(1.12)
    contrast(1.02);
  opacity: 1;
}

/* mobile tweaks: keep smaller top/right and remove heavy shadows for battery */
@media (max-width: 480px) {
  /* center the logo for vertical layouts */
  #titleImage {
    position: fixed;
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: clamp(72px, 24vw, 160px);
    animation-duration: 8s, 4.5s;
    filter: drop-shadow(0 8px 22px rgba(0, 150, 255, 0.08));
  }

  /* decorative sweep overlay */
  #titleImage::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 6px;
    pointer-events: none;
    background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.06) 32%,
      rgba(255, 255, 255, 0) 60%
    );
    mix-blend-mode: screen;
    opacity: 0.9;
    transform: translateX(-30%);
    animation: logoSweep 2.8s ease-in-out infinite;
  }

  /* sparkle accent */
  #titleImage::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    right: 6%;
    top: 6%;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.4) 30%,
      transparent 60%
    );
    filter: blur(2px) drop-shadow(0 2px 6px rgba(255, 255, 255, 0.12));
    opacity: 0.9;
    transform-origin: center;
    animation: logoSpark 4.2s linear infinite;
    pointer-events: none;
  }
}

@keyframes logoSweep {
  0% {
    transform: translateX(-40%);
    opacity: 0;
  }
  50% {
    transform: translateX(40%);
    opacity: 0.9;
  }
  100% {
    transform: translateX(-40%);
    opacity: 0;
  }
}

@keyframes logoSpark {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  10% {
    transform: scale(1);
    opacity: 1;
  }
  30% {
    transform: scale(1.2);
    opacity: 0.6;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

@keyframes logoFloat {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-6px) rotate(-0.2deg) scale(1.01);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 8px 30px rgba(0, 150, 255, 0.06));
    opacity: 0.96;
  }
  50% {
    filter: drop-shadow(0 20px 48px rgba(0, 150, 255, 0.14));
    opacity: 1;
  }
  100% {
    filter: drop-shadow(0 8px 30px rgba(0, 150, 255, 0.06));
    opacity: 0.96;
  }
}

/* Desktop-only ornate effects: aura, shimmer and tiny sparkles */
@media (min-width: 481px) {
  /* soft aura behind logo */
  #titleImage::before {
    content: "";
    position: absolute;
    inset: -18% -22% -12% -6%;
    border-radius: 14px;
    pointer-events: none;
    background:
      radial-gradient(
        60% 40% at 30% 40%,
        rgba(0, 180, 255, 0.12),
        transparent 30%
      ),
      radial-gradient(
        40% 30% at 80% 80%,
        rgba(255, 120, 160, 0.06),
        transparent 30%
      );
    filter: blur(36px) saturate(1.1);
    mix-blend-mode: screen;
    opacity: 0.9;
    animation: logoAura 9s ease-in-out infinite;
  }

  /* shimmer streak */
  #titleImage::after {
    content: "";
    position: absolute;
    left: -10%;
    top: -6%;
    width: 140%;
    height: 60%;
    pointer-events: none;
    background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.16) 40%,
      rgba(255, 255, 255, 0.02) 60%,
      rgba(255, 255, 255, 0) 100%
    );
    mix-blend-mode: screen;
    transform: translateX(-30%) rotate(-6deg);
    filter: blur(6px);
    opacity: 0;
    animation: logoShimmer 3.2s linear infinite;
  }

  /* tiny sparkle particles using box-shadow trick on a pseudo element */
  #titleImage .sparkle-fake {
    display: none; /* placeholder selector for potential JS; kept hidden */
  }

  @keyframes logoAura {
    0% {
      opacity: 0.7;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.03);
    }
    100% {
      opacity: 0.7;
      transform: scale(1);
    }
  }

  @keyframes logoShimmer {
    0% {
      transform: translateX(-40%) rotate(-6deg);
      opacity: 0;
    }
    20% {
      opacity: 0.5;
    }
    50% {
      transform: translateX(20%) rotate(-6deg);
      opacity: 0.95;
    }
    80% {
      opacity: 0.3;
    }
    100% {
      transform: translateX(-40%) rotate(-6deg);
      opacity: 0;
    }
  }

  /* wrapper to host multiple pseudo-elements for richer logo effects */
  #titleWrap {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 220;
    pointer-events: none;
    display: inline-block;
    width: clamp(96px, 12vw, 240px);
    height: auto;
    transform-origin: center right;
  }

  /* conic/neon halo around the logo */
  #titleWrap::before {
    content: "";
    position: absolute;
    inset: -18% -22% -12% -6%;
    border-radius: 18px;
    background: conic-gradient(
      from 120deg at 40% 40%,
      rgba(0, 220, 255, 0.06),
      rgba(255, 128, 200, 0.04),
      rgba(255, 200, 90, 0.05),
      rgba(0, 220, 255, 0.06)
    );
    filter: blur(28px) saturate(1.05);
    mix-blend-mode: screen;
    opacity: 0.95;
    animation: logoAura 9s ease-in-out infinite;
    pointer-events: none;
  }

  /* radial highlight that slowly rotates to add motion */
  #titleWrap::after {
    content: "";
    position: absolute;
    left: -6%;
    top: -6%;
    width: 112%;
    height: 112%;
    background: radial-gradient(
      circle at 25% 35%,
      rgba(255, 255, 255, 0.06),
      transparent 25%
    );
    transform: rotate(0deg);
    filter: blur(8px);
    opacity: 0.9;
    animation: logoRotateHighlight 16s linear infinite;
    pointer-events: none;
  }

  @keyframes logoRotateHighlight {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  /* neon color shift and pulse */
  @keyframes logoNeon {
    0% {
      filter: drop-shadow(0 10px 28px rgba(var(--neon-a), 0.06))
        drop-shadow(0 6px 18px rgba(var(--neon-b), 0.04));
    }
    25% {
      filter: drop-shadow(0 14px 36px rgba(var(--neon-c), 0.08))
        drop-shadow(0 10px 26px rgba(var(--neon-b), 0.06));
    }
    50% {
      filter: drop-shadow(0 18px 46px rgba(var(--neon-a), 0.12))
        drop-shadow(0 12px 30px rgba(var(--neon-b), 0.08));
    }
    75% {
      filter: drop-shadow(0 14px 36px rgba(var(--neon-c), 0.06))
        drop-shadow(0 10px 26px rgba(var(--neon-b), 0.04));
    }
    100% {
      filter: drop-shadow(0 10px 28px rgba(var(--neon-a), 0.06))
        drop-shadow(0 6px 18px rgba(var(--neon-b), 0.04));
    }
  }

  @keyframes logoPulse {
    0% {
      transform: translateY(0) scale(1);
    }
    50% {
      transform: translateY(-6px) scale(1.02);
    }
    100% {
      transform: translateY(0) scale(1);
    }
  }

  /* tiny moving sparkles: use multiple layered radial gradients on a pseudo-element */
  #titleImage::sparkles {
    content: "";
    position: absolute;
    inset: 4% 4% 4% 4%;
    pointer-events: none;
    border-radius: 8px;
    background-image:
      radial-gradient(
        circle at 12% 20%,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0) 30%
      ),
      radial-gradient(
        circle at 82% 30%,
        rgba(255, 240, 200, 0.8) 0%,
        rgba(255, 240, 200, 0) 30%
      ),
      radial-gradient(
        circle at 60% 70%,
        rgba(180, 220, 255, 0.65) 0%,
        rgba(180, 220, 255, 0) 30%
      );
    mix-blend-mode: screen;
    opacity: 0;
    filter: blur(1.6px);
    animation: logoSparks 5.6s linear infinite;
  }

  @keyframes logoSparks {
    0% {
      opacity: 0;
      transform: translateY(0) rotate(0);
    }
    10% {
      opacity: 0.9;
      transform: translateY(-2px) rotate(3deg);
    }
    30% {
      opacity: 0.65;
      transform: translateY(-6px) rotate(-6deg);
    }
    60% {
      opacity: 0.2;
      transform: translateY(4px) rotate(10deg);
    }
    100% {
      opacity: 0;
      transform: translateY(0) rotate(0);
    }
  }

  /* removed .titleBack ornate layers; keep only .titleTint layer */

  /* duplicated image tint layer: gold hue + blur + breathing */
  #titleWrap .titleTint {
    position: fixed;
    top: 18px;
    right: 14px;
    width: clamp(96px, 12vw, 240px);
    z-index: 210; /* behind the main image */
    pointer-events: none;
    transform-origin: center right;
    filter: blur(8px) saturate(1.12)
      drop-shadow(0 12px 28px rgba(255, 200, 80, 0.14));
    mix-blend-mode: screen;
    opacity: 0.9;
    animation: tintBreath 9s ease-in-out infinite;
  }

  @keyframes tintBreath {
    0% {
      transform: translateY(0) scale(0.98);
      opacity: 0.82;
      filter: blur(7px) saturate(1.02);
    }
    50% {
      transform: translateY(-4px) scale(1.06);
      opacity: 1;
      filter: blur(10px) saturate(1.18);
    }
    100% {
      transform: translateY(0) scale(0.98);
      opacity: 0.82;
      filter: blur(7px) saturate(1.02);
    }
  }

  /* keep main image drop-shadow for subtle depth */
  #titleWrap #titleImage {
    position: fixed; /* ?�면 ?�측 ?�단??고정 */
    top: 18px;
    right: 14px;
    width: clamp(96px, 12vw, 240px);
    z-index: 220; /* 배경·비디???? 모달보다 ?�래 */
    pointer-events: none;
    transform-origin: center right;
    filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.18));
  }

  /* 게임 로딩 ?�버?�이 ?�니메이??*/
  @keyframes fadeOut {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }

  /* ?��? ?�면(?�로 모바?? 최적??*/
  @media (max-width: 768px) {
    #titleImage {
      top: 10px;
      right: 10px;
      width: 140px;
    }
  }
}
