/* ========== 🎨 全局色彩與設計變數 ========== */
:root {
  /* 核心色調 */
  --primary-color: #5b52f5;
  --secondary-color: #8b5cf6;
  --accent-color: #14b8ff;
  
  /* 功能性色彩 */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --gold-color: #ffd700;
  
  /* 背景與表面 */
  --bg-main-start: #0a0e1a;
  --bg-main-end: #1a1f35;
  --surface-color: rgba(15, 23, 42, 0.75);
  --surface-border: rgba(148, 163, 184, 0.15);
  
  /* 文字 */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  
  /* 陰影與效果 */
  --shadow-glow: 0 0 60px rgba(91, 82, 245, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --transition-fast: all 0.2s ease;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans TC", "Inter", "Microsoft JhengHei UI", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(145deg, var(--bg-main-start) 0%, var(--bg-main-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  padding: 2rem 1rem;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    padding: 0.5rem 0;
  }
}

/* 粒子背景 */
.particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particles-bg::before,
.particles-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

.particles-bg::before {
  background: radial-gradient(circle, var(--primary-color), transparent);
  top: -200px;
  left: -200px;
}

.particles-bg::after {
  background: radial-gradient(circle, var(--accent-color), transparent);
  bottom: -200px;
  right: -200px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(100px, -100px) scale(1.1); }
  66% { transform: translate(-50px, 100px) scale(0.9); }
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

/* 防止彈窗打開時背景滾動 */
body.modal-open {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 🌌 豪華頁首設計 ========== */
.header {
  background: var(--surface-color);
  backdrop-filter: blur(30px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  margin: 0 1.5rem 1.5rem;
  box-shadow: var(--shadow-card);
  padding: 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.header.luxury {
  background: linear-gradient(135deg, rgba(91, 82, 245, 0.08), rgba(20, 184, 255, 0.05));
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 2.5rem;
}

.header-left {
  flex-shrink: 0;
}

.header-center {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.header-right {
  flex-shrink: 0;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffd700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.header-badge i {
  font-size: 1.1rem;
  color: #ffd700;
}

.header-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.deco-circle {
  position: absolute;
  border: 2px solid;
  border-radius: 50%;
  opacity: 0.1;
}

.deco-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -150px;
  border-color: rgba(91, 82, 245, 0.2);
  animation: rotate-slow 25s linear infinite;
}

.deco-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: 20%;
  border-color: rgba(20, 184, 255, 0.15);
  animation: rotate-slow 30s linear infinite reverse;
}

.deco-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 10%;
  border-color: rgba(0, 191, 255, 0.08);
  animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.header-icon {
  width: 60px;
  height: 60px;
  margin: 0;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
  position: relative;
  z-index: 1;
  animation: float-icon 3s ease-in-out infinite;
}

.header-icon i {
  font-size: 2rem;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.shine-text {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
  margin: 0;
  position: relative;
  z-index: 1;
}

@keyframes shine {
  0% { background-position: 0%; }
  100% { background-position: 200%; }
}

.title-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.title-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.title-decoration {
  color: #ffd700;
  font-size: 1rem;
  animation: twinkle 1.5s ease-in-out infinite;
}

.title-decoration:nth-child(3) {
  animation-delay: 0.75s;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin: 0;
  position: relative;
  z-index: 1;
  letter-spacing: 1.5px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .header {
    margin: 0 0.5rem 0.75rem;
    padding: 2rem 1.5rem;
  }
  
  .header.luxury {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .header-left,
  .header-right {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .header-center {
    width: 100%;
  }
  
  .shine-text {
    font-size: 2rem;
  }
  
  .title-main {
    font-size: 1.4rem;
  }
}

/* ========== 電腦版卡片式佈局 ========== */
@media (min-width: 900px) {
  .container {
    max-width: 1100px;
    padding: 32px 40px;
  }

  /* 頂部：統計橫排 + 用戶卡片右上角 */
  .dashboard-top-row {
    display: flex !important;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
  }

  /* 統計：4欄橫排，佔滿剩餘空間 */
  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 0 !important;
    flex: 1;
  }

  .stat-card {
    padding: 20px 16px;
  }

  /* 用戶卡片：緊湊版，右上角 */
  .user-info-card {
    margin-bottom: 0;
    padding: 16px 20px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .user-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .user-info-card .user-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .user-details {
    min-width: 0;
  }

  .user-info-card .user-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }

  .user-info-card .game-account {
    font-size: 0.8rem;
    padding: 2px 10px;
    margin-bottom: 0;
  }

  .user-info-card .user-actions {
    display: flex;
    gap: 8px;
    margin-top: 0;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-icon:hover {
    background: rgba(96, 165, 250, 0.3);
    border-color: var(--accent-color);
  }

  .btn-icon.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.2);
  }

  .btn-icon.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: var(--danger-color);
  }

  /* 隱藏手機版的快捷按鈕區 */
  .quick-actions {
    display: none !important;
  }

  /* 公告 */
  .announcement-section {
    margin-bottom: 20px;
  }

  /* 活動卡片 4 欄 */
  .activity-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1300px;
  }

  .user-info-card {
    min-width: 300px;
  }

  .stats-grid {
    gap: 20px !important;
  }
}
  }

  .stat-value {
    font-size: 2.2rem;
  }

  .activity-grid {
    gap: 24px;
  }

  .activity-card {
    padding: 36px 28px;
  }

  .activity-icon {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
  }
}

/* 頁首 */
.header {
  text-align: center;
  padding: 32px 30px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.header-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* 認證區塊 */
.auth-section {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 36px;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 電腦版頁首和認證區塊 */
@media (min-width: 900px) {
  .header {
    text-align: left;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: none;
    margin-bottom: 24px;
  }

  .header-icon {
    font-size: 2.5rem;
    margin-bottom: 0;
  }

  .header-content {
    flex: 1;
  }

  .header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
  }

  .header p {
    font-size: 0.9rem;
  }

  .auth-section {
    max-width: 440px;
    padding: 40px 48px;
  }
}

.auth-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-tab.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

.auth-tab:hover:not(.active) {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-helper {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.auth-link {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-link:hover {
  color: #7dd3fc;
}

/* 表單元素 */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
}

.form-group input {
  width: 100%;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.form-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 按鈕 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  border: none;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.5);
}

.btn-secondary {
  background: rgba(96, 165, 250, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.btn-secondary:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: var(--accent-color);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

/* 會員儀表板 */
.dashboard {
  display: none;
}

.dashboard.active {
  display: block;
}

/* 手機版：wrapper 元素不做特殊處理 */
.dashboard-top-row,
.dashboard-middle-row {
  display: contents;
}

.user-info-card {
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.95),
    rgba(15, 23, 42, 0.98)
  );
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.user-info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.user-avatar {
  width: 72px;
  height: 72px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.4);
}

.user-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #fff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: rgba(96, 165, 250, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.game-account i {
  color: var(--accent-color);
  font-size: 0.85rem;
}

.user-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.user-actions .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
  border-radius: 12px;
}

/* 統計卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), 0 0 20px rgba(96, 165, 250, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 14px;
  background: rgba(96, 165, 250, 0.12);
}

.stat-icon i {
  color: var(--accent-color);
}

/* 不同統計卡片的圖標顏色 */
.stat-card:nth-child(1) .stat-icon {
  background: rgba(96, 165, 250, 0.15);
}

.stat-card:nth-child(2) .stat-icon {
  background: rgba(245, 158, 11, 0.15);
}

.stat-card:nth-child(2) .stat-icon i {
  color: var(--gold-color);
}

.stat-card:nth-child(3) .stat-icon {
  background: rgba(16, 185, 129, 0.15);
}

.stat-card:nth-child(3) .stat-icon i {
  color: var(--success-color);
}

.stat-card:nth-child(3) .stat-value {
  color: var(--success-color);
}

.stat-card:nth-child(4) .stat-icon {
  background: rgba(168, 85, 247, 0.15);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* 活動卡片 */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-title i {
  color: var(--accent-color);
  font-size: 1.3rem;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.activity-card {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.activity-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.activity-card:hover::before {
  opacity: 0.1;
}

.activity-card:hover {
  border-color: rgba(96, 165, 250, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(96, 165, 250, 0.15);
}

.activity-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border-radius: 18px;
  background: rgba(96, 165, 250, 0.1);
  position: relative;
  z-index: 1;
}

.activity-icon i {
  color: var(--accent-color);
}

.activity-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.activity-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* 活動卡片包裝器 */
.activity-card-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.activity-card-wrapper .activity-card {
  flex: 1;
}

/* 查詢申請按鈕 */
.activity-query-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 12px;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}

.activity-query-btn:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.activity-query-btn i {
  font-size: 0.9rem;
}

/* 申請記錄 */
.records-section {
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.9),
    rgba(15, 23, 42, 0.95)
  );
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.records-section > .section-title {
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.3rem;
}

/* 記錄分組樣式 */
.record-group {
  margin-bottom: 16px;
  background: linear-gradient(
    145deg,
    rgba(20, 30, 48, 0.8),
    rgba(15, 23, 42, 0.9)
  );
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.12);
  transition: all 0.3s ease;
}

.record-group:hover {
  border-color: rgba(96, 165, 250, 0.25);
}

.record-group:last-child {
  margin-bottom: 0;
}

.record-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.08),
    rgba(139, 92, 246, 0.05)
  );
  border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.record-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.record-group-title i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(96, 165, 250, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--accent-color);
}

.record-group-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  background: rgba(96, 165, 250, 0.15);
  padding: 3px 10px;
  border-radius: 10px;
  margin-left: 8px;
}

.record-group-reward {
  color: var(--warning-color);
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.record-group-items {
  padding: 6px 12px;
}

.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  margin: 4px 0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.record-item:hover {
  background: rgba(96, 165, 250, 0.08);
}

.record-item:last-child {
  border-bottom: none;
}

.record-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.record-activity {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.record-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.record-amount {
  color: var(--warning-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.record-status {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

.record-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

.record-status.approved {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.record-status.distributed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.record-status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

.record-status.disabled {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.no-records {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.no-records i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* 載入動畫 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 訊息提示 */
.message {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.message.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* 隱藏 */
.hidden {
  display: none !important;
}

/* 更多記錄按鈕 */
.view-more-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
}

.view-more-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.98),
    rgba(15, 23, 42, 0.99)
  );
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  width: 100%;
  max-width: 420px;
  padding: 28px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(96, 165, 250, 0.1);
}

/* 記錄彈窗專用樣式 */
.modal.records-modal {
  max-width: 600px;
  max-height: 80vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.modal.detail-modal {
  max-width: 500px;
  max-height: 80vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
  position: sticky;
  top: 0;
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.98),
    rgba(25, 35, 52, 0.98)
  );
  border-radius: 24px 24px 0 0;
  z-index: 10;
}

.modal-header .modal-title {
  margin-bottom: 0;
  text-align: left;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  transform: scale(1.1);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

/* 模態框內的記錄分組特別樣式 */
.modal-body .record-group {
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 400px;
}

.modal-body .record-group:last-child {
  margin-bottom: 0;
}

.modal-body .record-group-header {
  padding: 12px 16px;
  flex-shrink: 0;
}

.modal-body .record-group-items {
  padding: 4px 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-body .record-item {
  padding: 10px 8px;
  margin: 2px 0;
  border-radius: 8px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  display: flex;
  align-items: center;
}

/* 記錄項目可點擊 */
.record-item.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.record-item.clickable:hover {
  background: rgba(96, 165, 250, 0.1);
  margin: 0 -8px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 8px;
}

.record-item .view-detail-icon {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.record-item.clickable:hover .view-detail-icon {
  opacity: 1;
}

/* 詳情內容 */
.detail-section {
  margin-bottom: 20px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.detail-value {
  font-size: 1rem;
  color: var(--text-primary);
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.detail-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.detail-photo {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s;
}

.detail-photo:hover {
  transform: scale(1.05);
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-status-row:last-child {
  border-bottom: none;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  flex: 1;
}

/* 響應式 - 手機版 */
@media (max-width: 720px) {
  .container {
    padding: 16px;
  }

  .header {
    padding: 30px 20px;
  }

  .header-icon {
    font-size: 3rem;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .auth-section {
    padding: 24px;
  }

  .user-info-card {
    padding: 24px;
  }

  .user-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .user-name {
    font-size: 1.3rem;
  }
}

@media (max-width: 500px) {
  .activity-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .activity-card {
    padding: 24px 16px;
  }

  .activity-icon {
    font-size: 2.2rem;
  }

  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 電腦版樣式增強 */
@media (min-width: 900px) {
  .records-section {
    padding: 32px;
  }

  /* 記錄分組並排顯示 - 使用 #recordsList */
  #recordsList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .record-group {
    margin-bottom: 0;
  }

  /* 用戶資訊卡片更緊湊 */
  .user-info-card {
    padding: 24px;
  }

  .user-avatar {
    width: 70px;
    height: 70px;
  }

  /* 統計卡片更大 */
  .stat-card {
    padding: 28px 20px;
  }

  .stat-value {
    font-size: 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 32px 48px;
  }

  /* 記錄可以顯示更多 */
  #recordsList {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal.records-modal {
    max-width: 800px;
  }

  .modal.records-modal .modal-body {
    padding: 24px;
  }

  /* 模態框內記錄並排 */
  #allRecordsList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* 公告區塊 */
.announcement-section {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  margin-bottom: 20px;
  overflow: hidden;
}

.announcement-slider {
  position: relative;
  height: 24px;
  overflow: hidden;
}

.announcement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  animation: none;
}

.announcement-item i {
  font-size: 1rem;
  color: var(--accent-color);
  flex-shrink: 0;
}

.announcement-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-item.info i {
  color: #3b82f6;
}
.announcement-item.reward i {
  color: #f59e0b;
}
.announcement-item.event i {
  color: #10b981;
}

@keyframes slideUp {
  0%,
  25% {
    transform: translateY(0);
    opacity: 1;
  }
  30%,
  95% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 快捷功能 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.9),
    rgba(15, 23, 42, 0.95)
  );
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quick-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quick-btn:hover::before {
  opacity: 0.1;
}

.quick-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
}

.quick-btn i {
  font-size: 1.5rem;
  color: var(--accent-color);
  position: relative;
  z-index: 1;
}

.quick-btn span {
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* 同步進度 */
.sync-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
}

.sync-progress i {
  color: var(--accent-color);
  animation: spin 1s linear infinite;
}

/* 會員等級徽章 */
.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-gradient);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin-left: 8px;
}

/* 統計卡片懸停效果 */
.stat-card {
  cursor: default;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* ========== 金幣系統樣式 ========== */

.coin-section {
  margin-bottom: 24px;
}

.coin-card {
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.08));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.coin-balance-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.coin-info {
  flex: 0 0 auto;
}

.coin-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.coin-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.coin-balance {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.coin-expire-info {
  font-size: 0.75rem;
  margin-top: 4px;
}

.coin-expire-info .expire-normal {
  color: var(--text-secondary);
}

.coin-expire-info .expire-warning {
  color: #f59e0b;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.btn-checkin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-checkin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-checkin.checked {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  cursor: default;
  box-shadow: none;
}

.btn-checkin.checked:hover {
  transform: none;
}

.btn-checkin:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.coin-extras {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.coin-extra-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.coin-extra-item:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
}

.coin-extra-item i {
  color: #fbbf24;
}

/* 盲盒 Modal */
.mystery-box-modal {
  max-width: 650px;
  width: 95%;
}

/* 大獎跑馬燈 */
.jackpot-marquee {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(251, 191, 36, 0.15), rgba(239, 68, 68, 0.15));
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.marquee-content {
  display: flex;
  animation: marquee 8s linear infinite;
  white-space: nowrap;
}

.marquee-item {
  padding-right: 100px;
  font-size: 0.9rem;
  color: #fbbf24;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.box-selection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.box-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
  border: 2px solid rgba(96, 165, 250, 0.3);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.box-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: 0.5s;
}

.box-card:hover::before {
  left: 100%;
}

.box-card:hover {
  border-color: rgba(96, 165, 250, 0.8);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.box-card.premium {
  border-color: rgba(168, 85, 247, 0.3);
}

.box-card.premium:hover {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.2);
}

.box-ribbon {
  position: absolute;
  top: 10px;
  right: -30px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 35px;
  transform: rotate(45deg);
}

.box-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.4);
  animation: boxFloat 3s ease-in-out infinite;
}

@keyframes boxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.box-icon.premium {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.box-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.box-cost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(251, 191, 36, 0.15);
  border-radius: 20px;
  font-size: 0.9rem;
  color: #fbbf24;
  margin-bottom: 10px;
}

.box-pity {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.btn-box-open {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.btn-box-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4);
}

.btn-box-open.premium {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.btn-box-open.premium:hover {
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.btn-box-info {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-box-info:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

/* 玩家開箱記錄面板 */
.global-history-panel {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
}

.global-box-history-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.global-box-history-compact .global-history-item {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.global-box-history-compact .history-time-small {
  font-size: 0.65rem;
  min-width: 60px;
}

/* 開箱記錄區域 - Modal 內 */
.box-history-section {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 14px;
}

.section-title-small {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-title-small i {
  color: var(--accent-color);
}

.global-box-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.global-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.85rem;
  border-left: 3px solid;
  transition: all 0.2s ease;
}

.global-history-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.history-time-small {
  font-size: 0.7rem;
  color: var(--text-secondary);
  min-width: 70px;
}

/* 稀有度顏色 */
.rarity-common { border-color: #9ca3af; color: #9ca3af; }
.rarity-uncommon { border-color: #22c55e; color: #22c55e; }
.rarity-rare { border-color: #3b82f6; color: #3b82f6; }
.rarity-epic { border-color: #a855f7; color: #a855f7; }
.rarity-legendary { border-color: #f97316; color: #f97316; }
.rarity-mythic { border-color: #ef4444; color: #ef4444; }

.no-records-small {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========== 開箱動畫 ========== */
#boxOpeningModal {
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
}

.box-opening-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.box-opening-animation {
  position: relative;
  width: 200px;
  height: 200px;
  perspective: 1000px;
}

.mystery-box-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: boxShake 0.5s ease-in-out;
}

.mystery-box-3d.opening {
  animation: boxOpen 1.5s ease-out forwards;
}

@keyframes boxShake {
  0%, 100% { transform: translateX(0) rotateY(0); }
  10% { transform: translateX(-10px) rotateY(-5deg); }
  30% { transform: translateX(10px) rotateY(5deg); }
  50% { transform: translateX(-8px) rotateY(-3deg); }
  70% { transform: translateX(8px) rotateY(3deg); }
  90% { transform: translateX(-4px) rotateY(-1deg); }
}

@keyframes boxOpen {
  0% { transform: scale(1) rotateY(0); }
  30% { transform: scale(1.1) rotateY(10deg); }
  50% { transform: scale(1.2) rotateY(-10deg); }
  70% { transform: scale(1.3) rotateY(5deg); }
  100% { transform: scale(0) rotateY(720deg); opacity: 0; }
}

.box-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 100px;
  background: linear-gradient(145deg, #fbbf24, #f59e0b);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(251, 191, 36, 0.5);
}

.box-body::before {
  content: '?';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.2);
}

.box-lid {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 40px;
  background: linear-gradient(145deg, #fcd34d, #fbbf24);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -5px 20px rgba(251, 191, 36, 0.3);
  transition: transform 0.5s ease;
}

.mystery-box-3d.opening .box-lid {
  animation: lidOpen 0.8s ease-out forwards;
}

@keyframes lidOpen {
  0% { transform: translateX(-50%) rotateX(0) translateY(0); }
  100% { transform: translateX(-50%) rotateX(-120deg) translateY(-50px); }
}

.box-glow {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.5) 0%, transparent 70%);
  animation: glowPulse 1s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* 粒子效果 */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: particleFly 1s ease-out forwards;
}

@keyframes particleFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* 獎品展示 */
.prize-reveal {
  text-align: center;
  animation: prizeAppear 0.5s ease-out;
}

@keyframes prizeAppear {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.prize-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: prizeGlow 2s ease-in-out infinite;
}

@keyframes prizeGlow {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.prize-card {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 3px solid;
  border-radius: 20px;
  padding: 40px;
  min-width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.prize-rarity {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prize-icon {
  width: 100px;
  height: 100px;
  margin: 20px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: iconBounce 1s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.prize-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.prize-value {
  font-size: 1rem;
  color: var(--text-secondary);
}

.btn-claim-prize {
  margin-top: 30px;
  padding: 14px 40px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-claim-prize:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5);
}

/* 金幣商城 */
.coin-shop-modal {
  max-width: 500px;
  width: 90%;
}

.shop-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 600;
}

.shop-balance i {
  color: #fbbf24;
  font-size: 1.3rem;
}

.shop-items {
  margin-bottom: 16px;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.shop-item:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
}

.shop-item-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
}

.shop-item-info {
  flex: 1;
}

.shop-item-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.shop-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.shop-item-price {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(251, 191, 36, 0.15);
  border-radius: 8px;
  color: #fbbf24;
  font-weight: 600;
}

.shop-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(96, 165, 250, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.shop-note i {
  color: var(--accent-color);
}

/* 抽獎券列表 */
.tickets-modal {
  max-width: 600px;
  width: 96%;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.ticket-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.ticket-tab {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
}

.ticket-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.ticket-tab.active {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
  color: #1a1a2e;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

.ticket-tab.active i {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.tickets-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.tickets-list::-webkit-scrollbar {
  width: 4px;
}

.tickets-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.tickets-list::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.4);
  border-radius: 2px;
}

.loading-small {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-secondary);
}

.loading-small::before {
  content: '\f3f4';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  display: block;
  font-size: 1.5rem;
  margin-bottom: 12px;
  animation: spin 1s linear infinite;
  color: #fbbf24;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-radius: 14px;
  margin-bottom: 14px;
  transition: all 0.3s ease;
  border: 1px solid rgba(251, 191, 36, 0.1);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}

.ticket-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
  border-radius: 4px 0 0 4px;
}

.ticket-item:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(255, 255, 255, 0.06) 100%);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
}

.ticket-item.used {
  opacity: 0.65;
  filter: grayscale(30%);
}

.ticket-item.used::before {
  background: linear-gradient(180deg, #64748b, #94a3b8);
}

.ticket-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #1a1a2e;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.35);
  position: relative;
}

.ticket-value-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
  border: 2px solid var(--bg-primary);
}

.ticket-icon.used {
  background: linear-gradient(135deg, #475569 0%, #64748b 50%, #475569 100%);
  box-shadow: 0 2px 8px rgba(71, 85, 105, 0.3);
}

.ticket-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticket-code {
  font-family: 'Consolas', 'Monaco', 'SF Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.ticket-item.used .ticket-code {
  color: #94a3b8;
}

.ticket-expire {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ticket-used-badge {
  padding: 6px 12px;
  background: rgba(100, 116, 139, 0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.btn-copy {
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 8px;
  color: var(--accent-color);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy:hover {
  background: rgba(96, 165, 250, 0.25);
}

.tickets-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(96, 165, 250, 0.08);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tickets-note i {
  color: var(--accent-color);
}

/* ========== 使用抽獎券按鈕 ========== */
.btn-use-ticket {
  padding: 8px 14px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-use-ticket:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #059669 100%);
}

.btn-use-ticket:active {
  transform: translateY(0) scale(0.98);
}

.btn-use-ticket i {
  font-size: 0.8rem;
  animation: bounce-right 1.5s ease-in-out infinite;
}

@keyframes bounce-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* 金幣交易記錄 */
.coin-history-modal {
  max-width: 500px;
  width: 90%;
}

.coin-history-list {
  max-height: 450px;
  overflow-y: auto;
}

.coin-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 8px;
}

.coin-history-item.earn {
  border-left: 3px solid #10b981;
}

.coin-history-item.spend {
  border-left: 3px solid #ef4444;
}

.history-left {
  flex: 1;
}

.history-source {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 4px;
}

.coin-history-item.earn .history-source i {
  color: #10b981;
}

.coin-history-item.spend .history-source i {
  color: #ef4444;
}

.history-amount {
  font-size: 1.1rem;
  font-weight: 700;
}

.history-amount.positive {
  color: #10b981;
}

.history-amount.negative {
  color: #ef4444;
}

/* 獎池預覽 */
.prize-pool-modal {
  max-width: 450px;
  width: 90%;
}

.prize-pool-list {
  max-height: 450px;
  overflow-y: auto;
}

.prize-pool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 8px;
}

.prize-pool-item.rare {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.prize-pool-item.legendary {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.prize-pool-icon {
  width: 36px;
  height: 36px;
  background: rgba(96, 165, 250, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #60a5fa;
}

.prize-pool-item.rare .prize-pool-icon {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.prize-pool-item.legendary .prize-pool-icon {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.prize-pool-name {
  flex: 1;
  font-weight: 500;
}

.prize-pool-prob {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

/* 開箱動畫 */
.box-opening-animation {
  padding: 30px;
}

.prize-result {
  padding: 30px;
  text-align: center;
}

.prize-result.legendary {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
  border-radius: 16px;
  border: 2px solid rgba(251, 191, 36, 0.3);
}

.prize-result.rare {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.1));
  border-radius: 16px;
  border: 2px solid rgba(168, 85, 247, 0.3);
}

/* 響應式調整 */
@media (max-width: 600px) {
  .coin-balance-area {
    flex-wrap: wrap;
  }
  
  .btn-checkin {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
  }
  
  .coin-extras {
    justify-content: space-between;
  }
  
  .coin-extra-item {
    flex: 1;
    min-width: calc(50% - 6px);
    justify-content: center;
  }
  
  .box-selection {
    grid-template-columns: 1fr;
  }
}

/* ========== 三欄內容區域 ========== */
.coin-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

/* 金幣獲取說明面板 */
.coin-earn-panel {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
}

.coin-earn-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.coin-earn-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coin-earn-list .coin-value {
  color: #22c55e;
  font-weight: 600;
}

/* 響應式 - 三欄變單欄 */
@media (max-width: 768px) {
  .coin-content-grid {
    grid-template-columns: 1fr;
  }
  
  .checkin-calendar {
    max-width: 100%;
  }
}

/* ========== 簽到日曆 ========== */
.checkin-calendar {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-title i {
  color: #10b981;
  margin-right: 8px;
}

.calendar-stats {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.calendar-stats span {
  color: #10b981;
  font-weight: 600;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-days .day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  transition: all 0.2s ease;
  max-width: 36px;
  max-height: 36px;
}

.calendar-days .day.empty {
  background: transparent;
}

.calendar-days .day.today {
  border: 2px solid var(--accent-color);
  font-weight: 600;
}

.calendar-days .day.checked {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.calendar-days .day.checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  bottom: 1px;
  right: 1px;
  font-size: 0.45rem;
  color: white;
  opacity: 0.8;
}

.calendar-days .day.missed {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* 響應式 - 日曆 */
@media (max-width: 480px) {
  .calendar-days .day {
    font-size: 0.75rem;
  }
  
  .calendar-days .day.checked::after {
    font-size: 0.5rem;
  }
  
  .btn-use-ticket {
    padding: 6px 10px;
    font-size: 0.65rem;
  }
  
  /* 抽獎券手機版優化 */
  .ticket-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  
  .ticket-item > .ticket-icon {
    display: none;
  }
  
  .ticket-info {
    order: 1;
  }
  
  .ticket-code {
    font-size: 0.85rem;
    text-align: left;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    word-break: break-all;
  }
  
  .ticket-item .btn-copy,
  .ticket-item .btn-use-ticket {
    order: 2;
    width: 100%;
    height: auto;
    padding: 10px;
    font-size: 0.85rem;
  }
  
  .ticket-used-badge {
    order: 2;
    text-align: center;
    width: 100%;
  }
  
  .tickets-modal {
    padding: 16px;
  }
  
  /* 盲盒手機版優化 */
  .mystery-box-modal {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .box-selection {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .box-card {
    padding: 16px 12px;
  }
  
  .box-icon {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    margin-bottom: 10px;
  }
  
  .box-name {
    font-size: 1rem;
  }
  
  .box-cost {
    font-size: 0.85rem;
    padding: 5px 12px;
  }
  
  .box-pity {
    font-size: 0.75rem;
  }
  
  .btn-box-open {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  /* 我的開箱記錄手機版優化 */
  .my-box-history {
    padding: 12px;
  }
  
  .history-item {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .history-item .prize-name {
    font-size: 0.9rem;
  }
  
  .marquee-content {
    font-size: 0.8rem;
  }
  
  /* 金幣商城手機版優化 */
  .coin-shop-modal {
    max-width: 100%;
    width: 96%;
  }
  
  .coin-shop-modal .shop-item {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }
  
  .coin-shop-modal .shop-item-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .coin-shop-modal .shop-item-info {
    flex: 1;
    min-width: 150px;
  }
  
  .coin-shop-modal .shop-item-name {
    font-size: 0.95rem;
  }
  
  .coin-shop-modal .shop-item-desc {
    font-size: 0.8rem;
  }
  
  .coin-shop-modal .shop-item-price {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  .coin-shop-modal .shop-balance {
    font-size: 1rem;
    padding: 12px;
  }
  
  .coin-shop-modal .shop-note {
    font-size: 0.8rem;
    padding: 10px;
  }
  
  /* 金幣獲取說明手機版 */
  .coin-earn-tips {
    font-size: 0.75rem;
  }
  
  .coin-earn-tips li {
    padding: 6px 0;
  }
  
  /* 獎池預覽手機版優化 */
  .prize-pool-modal {
    max-width: 100%;
    width: 96%;
  }
  
  .prize-pool-list {
    max-height: 60vh;
  }
  
  .prize-pool-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
  }
  
  .prize-pool-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }
  
  .prize-pool-name {
    flex: 1;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .prize-pool-prob {
    font-size: 0.8rem;
    padding: 3px 8px;
    flex-shrink: 0;
  }
}
