/* ===== Lucky Poker 主題 ===== */
:root {
  --gold:        #d4af37;
  --gold-light:  #f5d97f;
  --gold-bright: #ffd700;
  --gold-deep:   #8a6d22;
  --gold-text-gradient:   linear-gradient(180deg, #fff7c0 0%, #f5d97f 25%, #d4af37 60%, #8a6d22 100%);
  --gold-button-gradient: linear-gradient(135deg, #fff7c0 0%, #f0c649 35%, #d4af37 60%, #a8861f 100%);
  --gold-line-gradient:   linear-gradient(90deg, transparent, var(--gold), transparent);
  --bg-darkest:  #050403;
  --bg-dark:     #0d0a08;
  --bg-card:     #1a1410;
  --bg-card-2:   #2a2218;
  --text-light:  #e8d8b8;
  --text-dim:    #8a8068;
  --danger:      #c0392b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: "Microsoft JhengHei", "Helvetica Neue", sans-serif;
  background: var(--bg-darkest);
  color: var(--text-light);
  min-height: 100vh;
  /* 黑色皮革紋理 + 角落金色光暈 */
  background-image:
    radial-gradient(ellipse at 20% 0%,  rgba(212,175,55,0.10), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(212,175,55,0.08), transparent 55%),
    radial-gradient(circle at 50% 50%,   rgba(212,175,55,0.03), transparent 70%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* 通用按鈕：暗背景 + 金色框 → hover 金底黑字 */
button {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #2a2218 0%, #14100c 100%);
  color: var(--gold-light);
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}
button:hover:not(:disabled) {
  background: var(--gold-button-gradient);
  color: #0a0807;
  box-shadow: 0 0 14px rgba(212,175,55,0.45);
}
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 主要按鈕：直接金底 */
button.primary,
button[type="submit"].primary {
  background: var(--gold-button-gradient);
  color: #0a0807;
  border: 0;
}
button.primary:hover { box-shadow: 0 0 20px rgba(212,175,55,0.65); }

input, select {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(212,175,55,0.3);
  background: rgba(0,0,0,0.5);
  color: var(--text-light);
  transition: all 0.2s;
}
input:focus, select:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 8px rgba(212,175,55,0.35);
}
input::placeholder { color: var(--text-dim); }

.hidden { display: none !important; }

.msg {
  padding: 8px 0;
  color: #ff8a8a;
  min-height: 22px;
  text-align: center;
  font-size: 13px;
}
.msg.success { color: var(--gold-light); }

/* ===== 品牌標誌 ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
}
.brand .logo-mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
}
.brand .brand-text {
  background: var(--gold-text-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: 20px;
  letter-spacing: 3px;
  font-weight: 900;
}

/* ===== 金色裝飾分隔線（中間有 ♠ 符號） ===== */
.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0;
}
.gold-divider::before,
.gold-divider::after {
  content: '';
  flex: 1;
  max-width: 140px;
  height: 1px;
  background: var(--gold-line-gradient);
}
.gold-divider .symbol {
  color: var(--gold);
  font-size: 14px;
  text-shadow: 0 0 10px rgba(212,175,55,0.5);
}

/* ===== 上方 nav bar ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(20,15,10,0.97) 0%, rgba(10,8,7,0.95) 100%);
  border-bottom: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 2px 14px rgba(0,0,0,0.6), 0 1px 0 rgba(212,175,55,0.15);
}
.topbar .brand .brand-text { font-size: 18px; }
.topbar .user-info {
  display: flex; gap: 18px; align-items: center;
  font-size: 13px;
}
.chips {
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.4);
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 13px;
}
.chips b { color: var(--gold-bright); margin-left: 4px; }

/* 頂列導覽按鈕（例：好友） */
.nav-btn {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.nav-btn:hover {
  background: rgba(212,175,55,0.15);
  color: var(--gold-bright);
}

/* 音樂開關按鈕 */
.music-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.4);
  background: rgba(0,0,0,0.4);
  color: var(--gold-bright);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  letter-spacing: 0;
  line-height: 1;
}
.music-btn:hover:not(:disabled) {
  background: rgba(212,175,55,0.18);
  color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(212,175,55,0.3);
}
.music-btn.muted { color: var(--text-dim); }
.music-btn.muted:hover { color: var(--text-light); }
.music-btn.muted::after {
  /* 靜音時加一條斜線 */
  content: '';
  position: absolute;
  top: 50%;
  left: 5px;
  right: 5px;
  height: 2px;
  background: currentColor;
  transform: rotate(-40deg);
  pointer-events: none;
  border-radius: 1px;
}

/* 金色標題（用在區塊 h2） */
.gold-title {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 900;
  background: var(--gold-text-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(212,175,55,0.25);
}

/* 金色邊框卡片 */
.gold-card {
  position: relative;
  background: linear-gradient(160deg, #1a1410 0%, #100c08 100%);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow:
    0 4px 22px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(212,175,55,0.12);
}

/* ===== 牌桌頁的「返回大廳」連結（含品牌 logo） ===== */
.brand.back-link {
  text-decoration: none;
  color: var(--gold-light);
  transition: opacity 0.2s;
}
.brand.back-link:hover { opacity: 0.85; }
.back-arrow {
  font-size: 18px;
  color: var(--gold);
  margin-right: -4px;
}

/* ===== Mobile (≤ 768px) 共用調整 ===== */
@media (max-width: 768px) {
  .topbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .topbar .brand .brand-text { display: none; } /* 手機只顯示 logo */
  .topbar .brand .logo-mark { width: 30px; height: 30px; }
  .topbar .user-info {
    gap: 8px;
    font-size: 12px;
  }
  .topbar .user-info button {
    padding: 6px 12px;
    font-size: 12px;
  }
  .chips { padding: 4px 10px; font-size: 12px; }

  /* 大標題縮一階 */
  .gold-title { font-size: 15px; letter-spacing: 2px; margin-bottom: 12px; }

  /* 確保按鈕點擊範圍夠大 */
  button { min-height: 38px; }
  input, select { min-height: 38px; font-size: 14px; }
}
