/* 彩票應用統一主題樣式 */

/* ======================== */
/* 色彩系統定義 */
/* ======================== */
:root {
  /* 主題色彩 */
  --primary-red: #ff6b6b;
  --primary-gold: #ffd700;
  --primary-purple: #764ba2;
  --lucky-orange: #ee5a24;
  
  /* 輔助色彩 */
  --success-green: #00b894;
  --wealth-green: #00a085;
  --royal-blue: #74b9ff;
  --accent-pink: #fd79a8;
  
  /* 漸變色彩 */
  --gradient-primary: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  --gradient-wealth: linear-gradient(135deg, #ffd700 0%, #ff8f00 100%);
  --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #00b894 0%, #00a085 100%);
  --gradient-royal: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  
  /* 背景與文字 */
  --bg-primary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.2);
  --bg-overlay: rgba(0, 0, 0, 0.5);
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: rgba(255, 255, 255, 0.9);
  
  /* 陰影效果 */
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-colored: 0 8px 25px rgba(255, 107, 107, 0.3);
  --shadow-wealth: 0 8px 25px rgba(255, 215, 0, 0.3);
  --shadow-success: 0 8px 25px rgba(0, 184, 148, 0.3);
}

/* ======================== */
/* 基礎動畫效果 */
/* ======================== */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes shimmer {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

@keyframes dice-roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes dice-appear {
  0% { transform: scale(0) rotateY(180deg); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes coinDrop {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(20px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes slideShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ======================== */
/* 通用元件樣式 */
/* ======================== */

/* 幸運裝飾背景 */
.lucky-decoration::before {
  content: '💎';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3em;
  opacity: 0.2;
  animation: float 3s ease-in-out infinite;
}

.wealth-decoration::before {
  content: '💰';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 8em;
  opacity: 0.1;
  transform: rotate(15deg);
}

.dice-decoration::before {
  content: '🎲';
  position: absolute;
  top: -30px;
  left: -30px;
  font-size: 10em;
  opacity: 0.1;
  animation: dice-roll 4s linear infinite;
}

/* 卡片樣式增強 */
.luxury-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.luxury-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

/* 玻璃質感效果 */
.glass-effect {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 光澤掃過效果 */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.shine-effect:hover::before {
  animation: slideShine 0.5s ease;
}

/* ======================== */
/* 「我的」頁面專屬樣式 */
/* ======================== */

/* 個人檔案頭部 */
.profile-header-enhanced {
  background: var(--gradient-wealth);
  position: relative;
  overflow: hidden;
  padding: 40px;
  border-radius: 20px 20px 0 0;
}

.profile-header-enhanced::before {
  content: '💎';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3em;
  opacity: 0.2;
  animation: float 3s ease-in-out infinite;
}

.user-avatar-enhanced {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  color: white;
  margin: 0 auto 20px;
}

.vip-badge {
  background: var(--gradient-primary);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
  display: inline-block;
  box-shadow: var(--shadow-light);
}

/* 錢包餘額展示 */
.balance-showcase {
  background: var(--gradient-success);
  /*border-radius: 20px;*/
  padding: 30px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  color: white;
}

.balance-showcase::before {
  content: '💰';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 8em;
  opacity: 0.1;
  transform: rotate(15deg);
}

.balance-main {
  text-align: center;
  position: relative;
  z-index: 1;
}

.balance-amount-large {
  font-size: 3em;
  font-weight: 900;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin: 10px 0;
  letter-spacing: -1px;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.balance-btn-enhanced {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 15px 20px;
  border-radius: 15px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.balance-btn-enhanced:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 投注記錄卡片 */
.bet-record-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 5px solid var(--primary-red);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bet-record-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
}

.bet-record-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
}

.bet-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.bet-status-win {
  background: rgba(0, 184, 148, 0.1);
  color: var(--success-green);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
}

.bet-status-lose {
  background: rgba(255, 107, 107, 0.1);
  color: var(--primary-red);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
}

/* ======================== */
/* FastThree 頁面專屬樣式 */
/* ======================== */

/* 遊戲頭部增強 */
.game-header-enhanced {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
  padding: 40px;
  color: white;
  text-align: center;
}

.game-header-enhanced::before {
  content: '🎲';
  position: absolute;
  top: -30px;
  left: -30px;
  font-size: 10em;
  opacity: 0.1;
  animation: dice-roll 4s linear infinite;
}

.game-header-enhanced::after {
  content: '🎰';
  position: absolute;
  bottom: -30px;
  right: -30px;
  font-size: 10em;
  opacity: 0.1;
  animation: dice-roll 4s linear infinite reverse;
}

.game-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.info-card-enhanced {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.countdown-display {
  font-size: 2.5em;
  font-weight: 900;
  color: var(--primary-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 開獎結果展示 */
.lottery-result-enhanced {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: var(--shadow-medium);
  position: relative;
}

.lottery-result-enhanced::before {
  content: '🌟';
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2em;
  opacity: 0.3;
  animation: twinkle 2s ease-in-out infinite;
}

.dice-container-enhanced {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.dice-3d {
  width: 80px;
  height: 80px;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
  font-weight: bold;
  color: var(--primary-red);
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 2px solid #e0e0e0;
  animation: dice-appear 0.6s ease-out;
  position: relative;
}

.dice-3d::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent);
  border-radius: 12px;
}

/* 投注選項增強 */
.betting-category-enhanced {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-light);
  border-top: 4px solid var(--primary-red);
}

.category-title-enhanced {
  color: var(--text-primary);
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title-enhanced::before {
  content: '💎';
  font-size: 1.2em;
}

.bet-option-enhanced {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border: 2px solid #e9ecef;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bet-option-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
  transition: left 0.5s;
}

.bet-option-enhanced:hover::before {
  left: 100%;
}

.bet-option-enhanced:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--primary-gold);
  box-shadow: 
    var(--shadow-medium),
    0 0 20px rgba(255, 215, 0, 0.2);
}

.bet-option-enhanced.selected {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-red);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-colored);
}

.bet-title-enhanced {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 8px;
}

.bet-odds-enhanced {
  background: rgba(255, 215, 0, 0.2);
  color: var(--lucky-orange);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
  display: inline-block;
}

.bet-option-enhanced.selected .bet-odds-enhanced {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 投注金額控制 */
.bet-amount-control-enhanced {
  background: var(--gradient-purple);
  border-radius: 20px;
  padding: 30px;
  color: white;
  position: relative;
  overflow: hidden;
}

.bet-amount-control-enhanced::before {
  content: '💸';
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 8em;
  opacity: 0.1;
}

.amount-input-group-enhanced {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 15px;
}

.amount-input-enhanced {
  width: 180px;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  color: var(--text-primary);
}

.amount-btn-enhanced {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: bold;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.amount-btn-enhanced:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.quick-amounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.quick-amount-enhanced {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 12px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.quick-amount-enhanced:hover {
  background: var(--primary-gold);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* 確認投注按鈕 */
.confirm-bet-section {
  text-align: center;
  margin-top: 30px;
}

.confirm-bet-btn-enhanced {
  background: var(--gradient-wealth);
  color: var(--text-primary);
  border: none;
  padding: 20px 60px;
  border-radius: 50px;
  font-size: 1.3em;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 
    var(--shadow-medium),
    0 0 30px rgba(255, 215, 0, 0.3);
  display: inline-block;
}

.confirm-bet-btn-enhanced::before {
  content: '💰';
  position: absolute;
  left: 20px;
  font-size: 1.5em;
  top: 50%;
  transform: translateY(-50%);
}

.confirm-bet-btn-enhanced::after {
  content: '🎯';
  position: absolute;
  right: 20px;
  font-size: 1.5em;
  top: 50%;
  transform: translateY(-50%);
}

.confirm-bet-btn-enhanced:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    var(--shadow-heavy),
    0 0 40px rgba(255, 215, 0, 0.5);
}

.confirm-bet-btn-enhanced:active {
  transform: translateY(-1px) scale(1.02);
}

/* 投注摘要 */
.bet-summary-enhanced {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: bold;
}

.summary-item:last-child {
  border-top: 2px solid var(--primary-gold);
  padding-top: 10px;
  font-size: 1.1em;
  color: var(--success-green);
}

/* ======================== */
/* 響應式設計 */
/* ======================== */
@media (max-width: 768px) {
  .bet-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dice-container-enhanced {
    gap: 15px;
  }
  
  .dice-3d {
    width: 60px;
    height: 60px;
    font-size: 2em;
  }
  
  .amount-input-group-enhanced {
    flex-direction: column;
    gap: 15px;
  }
  
  .balance-actions {
    grid-template-columns: 1fr;
  }
  
  .game-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .bet-options-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-amounts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .balance-amount-large {
    font-size: 2.2em;
  }
  
  .confirm-bet-btn-enhanced {
    padding: 15px 40px;
    font-size: 1.1em;
  }
}