@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=JetBrains+Mono:wght@400;700&display=swap");

/* ===== 賽博龐克抽抽樂界面 ===== */

/* CSS 變數定義 */
:root {
  /* 賽博龐克主色調 */
  --cyber-primary: #ff006e;
  --cyber-secondary: #00f5ff;
  --cyber-accent: #ff10f0;
  --cyber-warning: #ffaa00;
  --cyber-success: #00ff41;
  --cyber-danger: #ff0040;

  /* 霓虹發光色 */
  --neon-pink: #ff006e;
  --neon-blue: #00f5ff;
  --neon-purple: #bf00ff;
  --neon-pink: #ff006e;
  --neon-red: #ff0040;
  --neon-green: #00ff41;
  --neon-yellow: #ffde00;
  --neon-cyan: #00f5ff;
  --neon-gold: #ffd700;

  /* 背景色 */
  --bg-dark: #0a0a0f;
  --bg-darker: #050507;
  --bg-card: #0f0f1a;
  --bg-hover: #1a1a2e;
  --bg-glass: rgba(15, 15, 26, 0.85);
  --bg-glass-light: rgba(51, 65, 85, 0.6);

  /* 邊框和線條 */
  --border-neon: #00f5ff;
  --border-dim: rgba(0, 245, 255, 0.2);
  --border-accent: rgba(6, 182, 212, 0.3);
  --grid-color: rgba(0, 245, 255, 0.1);

  /* 文字色彩 */
  --text-primary: #ffffff;
  --text-secondary: #00f5ff;
  --text-muted: #8b8b9a;
  --text-accent: #06b6d4;

  /* 發光效果 */
  --glow-pink: 0 0 20px #ff006e, 0 0 40px #ff006e, 0 0 60px #ff006e;
  --glow-blue: 0 0 20px #00f5ff, 0 0 40px #00f5ff, 0 0 60px #00f5ff;
  --glow-purple: 0 0 20px #bf00ff, 0 0 40px #bf00ff, 0 0 60px #bf00ff;
  --glow-small: 0 0 10px currentColor;
  --glow-medium: 0 0 20px currentColor;
  --glow-large: 0 0 30px currentColor;

  /* 陰影效果 */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-neon: 0 0 30px rgba(0, 245, 255, 0.4);

  /* 動畫時間 */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 賽博龐克動畫 ===== */
@keyframes cyber-grid-move {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

@keyframes cyber-pulse {
  0%,
  100% {
    box-shadow:
      0 0 20px var(--neon-blue),
      0 0 40px var(--neon-blue),
      0 0 60px var(--neon-blue);
  }
  50% {
    box-shadow:
      0 0 30px var(--neon-blue),
      0 0 60px var(--neon-blue),
      0 0 90px var(--neon-blue);
  }
}

@keyframes cyber-scan-line {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  2% {
    opacity: 0.8;
  }
  98% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes neon-flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  75% {
    opacity: 0.9;
  }
}

@keyframes hologram-flicker {
  0%,
  100% {
    opacity: 1;
  }
  10%,
  20%,
  30% {
    opacity: 0.6;
  }
  40%,
  60%,
  80% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.7;
  }
}

@keyframes section-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes modal-slide-in {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-fade-in {
  0% {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  100% {
    opacity: 1;
    backdrop-filter: blur(15px);
  }
}

/* ===== 頁面主體設定 ===== */
.lottery-page {
  background: linear-gradient(
    135deg,
    var(--bg-darker) 0%,
    var(--bg-dark) 30%,
    #1a1a2e 70%,
    var(--bg-card) 100%
  );
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: "Orbitron", monospace;
}

/* 賽博龐克網格背景 */
.lottery-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: -1px -1px;
  animation: cyber-grid-move 20s linear infinite;
  pointer-events: none;
  z-index: -2;
  opacity: 0.3;
}

/* 粒子效果背景 */
.lottery-page::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 0, 110, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0, 245, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 70%,
      rgba(191, 0, 255, 0.05) 0%,
      transparent 40%
    );
  pointer-events: none;
  z-index: -1;
  animation: hologram-flicker 8s ease-in-out infinite;
}

/* ===== 主容器 ===== */
.lottery-variables {
  position: relative;
  z-index: 1;
}

.lottery-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== 標題區域 ===== */
.lottery-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 0;
}

.lottery-header h1 {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--glow-blue);
  margin: 0 0 20px 0;
  animation: neon-flicker 3s ease-in-out infinite;
}

.lottery-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.9;
}

/* ===== 規則說明區域 ===== */
.lottery-rules {
  background: var(--bg-glass);
  border: 2px solid var(--border-dim);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 40px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}

.lottery-rules::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    var(--neon-pink),
    transparent
  );
  animation: cyber-scan-line 3s ease-in-out infinite;
}

.lottery-rules h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.lottery-rules h2 i {
  color: var(--neon-blue);
  text-shadow: var(--glow-small);
}

.lottery-rules-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.lottery-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid var(--border-dim);
  transition: var(--transition);
}

.lottery-rule-item:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
  transform: translateY(-2px);
}

.lottery-rule-item i {
  color: var(--neon-blue);
  font-size: 1.5rem;
  margin-top: 5px;
  text-shadow: var(--glow-small);
}

.lottery-rule-item h4 {
  color: var(--text-primary);
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.lottery-rule-item p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ===== 創建房間按鈕區域 ===== */
.lottery-create-section {
  margin-bottom: 40px;
}

.create-room-container {
  display: flex;
  justify-content: center;
}

.create-room-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 0, 110, 0.2) 0%,
    rgba(0, 245, 255, 0.2) 100%
  );
  border: 2px solid var(--border-neon);
  border-radius: 15px;
  padding: 25px 40px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  font-family: "Orbitron", monospace;
}

.create-room-btn::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: var(--transition);
}

.create-room-btn:hover {
  border-color: var(--neon-blue);
  box-shadow: var(--glow-blue);
  transform: translateY(-3px);
}

.create-room-btn:hover::before {
  left: 100%;
}

.btn-icon i {
  font-size: 2rem;
  color: var(--neon-blue);
  text-shadow: var(--glow-small);
}

.btn-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.3rem;
}

.btn-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-arrow i {
  color: var(--neon-pink);
  font-size: 1.5rem;
  transition: var(--transition);
}

.create-room-btn:hover .btn-arrow i {
  transform: translateX(5px);
}

/* ===== 抽獎箱選擇區域 ===== */
.lottery-selection {
  margin-bottom: 40px;
}

.lottery-selection h2 {
  color: var(--text-primary);
  font-size: 2rem;
  margin: 0 0 30px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.lottery-selection h2 i {
  color: var(--neon-green);
  text-shadow: var(--glow-small);
}

.lottery-boxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

/* ===== 抽獎房間列表 ===== */
.lottery-box {
  background: var(--bg-glass);
  border: 2px solid var(--border-dim);
  border-radius: 15px;
  padding: 0;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.lottery-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--neon-pink),
    var(--neon-blue),
    var(--neon-purple)
  );
  opacity: 0;
  transition: var(--transition);
}

.lottery-box:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.3);
  transform: translateY(-5px);
}

.lottery-box:hover::before {
  opacity: 1;
}

/* 房間標題區域 */
.lottery-header {
  padding: 20px 20px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.lottery-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  margin-right: 15px;
}

.price-tag {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: var(--glow-small);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.per-pick {
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

/* 預覽區域 */
.preview-section {
  padding: 0 20px;
  margin-bottom: 15px;
  position: relative;
  min-height: 120px;
  display: flex;
  gap: 15px;
}

.preview-image-container {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.preview-loading i {
  font-size: 1.5rem;
  color: var(--neon-blue);
  animation: neon-flicker 1s infinite;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.prize-info-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 100px;
}

.max-prize-value {
  background: rgba(255, 215, 0, 0.2);
  border: 2px solid var(--neon-yellow);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  color: var(--neon-yellow);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: var(--glow-small);
  backdrop-filter: blur(10px);
}

.s-prize-remaining {
  background: linear-gradient(
    135deg,
    rgba(0, 255, 65, 0.2) 0%,
    rgba(255, 170, 0, 0.2) 100%
  );
  border: 2px solid var(--neon-green);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s-prize-remaining.sold-out {
  background: linear-gradient(
    135deg,
    rgba(255, 0, 64, 0.2) 0%,
    rgba(255, 106, 0, 0.2) 100%
  );
  border-color: var(--cyber-danger);
}

.s-count {
  color: var(--neon-green);
  font-size: 1rem;
  font-weight: 700;
  text-shadow: var(--glow-small);
}

.s-prize-remaining.sold-out .s-count {
  color: var(--cyber-danger);
}

.s-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  opacity: 0.8;
}

/* 內容區域 */
.content-section {
  padding: 0 20px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lottery-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat {
  text-align: center;
  padding: 8px 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid var(--border-dim);
  transition: var(--transition);
}

.stat:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

.stat i {
  color: var(--neon-blue);
  font-size: 1rem;
  margin-bottom: 3px;
  display: block;
}

.stat span {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
}

.stat small {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: block;
}

.enter-room-btn {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border: 2px solid var(--neon-blue);
  border-radius: 10px;
  padding: 12px 20px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Orbitron", monospace;
  position: relative;
  overflow: hidden;
}

.enter-room-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: var(--transition);
}

.enter-room-btn:hover {
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
}

.enter-room-btn:hover::before {
  left: 100%;
}

/* 沒有房間時的提示 */
.lottery-no-lotteries {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.lottery-no-lotteries i {
  font-size: 3rem;
  color: var(--neon-blue);
  margin-bottom: 20px;
  opacity: 0.7;
}

.lottery-no-lotteries h3 {
  color: var(--text-primary);
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.lottery-no-lotteries p {
  margin: 0;
  font-size: 1rem;
}

/* ===== 創建房間模態框 ===== */
.lottery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(0px);
  overflow: hidden;
}

.lottery-modal.show {
  display: flex !important;
  background: linear-gradient(
    135deg,
    rgba(5, 5, 7, 0.95) 0%,
    rgba(10, 10, 15, 0.92) 50%,
    rgba(15, 15, 26, 0.95) 100%
  );
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(15px);
}

/* 賽博龐克網格背景 */
.lottery-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: -1px -1px;
  animation: cyber-grid-move 20s linear infinite;
  opacity: 0.3;
  pointer-events: none;
}

/* 粒子效果背景 */
.lottery-modal::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 0, 110, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0, 245, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 70%,
      rgba(191, 0, 255, 0.05) 0%,
      transparent 40%
    );
  pointer-events: none;
  animation: hologram-flicker 8s ease-in-out infinite;
}

/* 模態框內容 */
.lottery-modal .modal-content {
  background: var(--bg-glass);
  border: 2px solid var(--border-neon);
  border-radius: 0;
  max-width: 1100px;
  width: 95%;
  max-height: 90vh;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 50px rgba(0, 245, 255, 0.3),
    inset 0 0 50px rgba(0, 245, 255, 0.05);
  clip-path: polygon(
    0 20px,
    20px 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
  transform: scale(0.9) translateY(50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Orbitron", monospace;
}

.lottery-modal.show .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  animation: modal-slide-in 0.4s ease-out;
}

/* 掃描線效果 */
.lottery-modal .modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    var(--neon-pink),
    transparent
  );
  animation: cyber-scan-line 3s ease-in-out infinite;
  z-index: 1;
}

/* 模態框標題 */
.lottery-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  border-bottom: 2px solid var(--border-dim);
  background: rgba(0, 245, 255, 0.05);
  position: relative;
}

.lottery-modal .modal-header h3 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lottery-modal .modal-header h3 i {
  color: var(--neon-blue);
  text-shadow: var(--glow-small);
}

/* 關閉按鈕 */
.lottery-modal .close-modal {
  background: rgba(255, 0, 64, 0.2);
  border: 2px solid var(--cyber-danger);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyber-danger);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.lottery-modal .close-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 0, 64, 0.3), transparent);
  opacity: 0;
  transition: var(--transition);
}

.lottery-modal .close-modal:hover {
  border-color: var(--cyber-danger);
  box-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
  transform: rotate(90deg);
}

.lottery-modal .close-modal:hover::before {
  opacity: 1;
}

/* 模態框主體 */
.lottery-modal .modal-body {
  padding: 30px;
  position: relative;
  overflow-y: auto;
  max-height: calc(90vh - 160px);
}

/* 表單控制元素美化 */
.lottery-modal .form-group {
  margin-bottom: 25px;
}

.lottery-modal .form-group label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lottery-modal .form-control {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-dim);
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  font-family: "Orbitron", monospace;
}

.lottery-modal .form-control:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
  background: rgba(0, 245, 255, 0.05);
}

.lottery-modal .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.lottery-modal select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%2300f5ff' d='M2 0L0 2h4zM2 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
}

.lottery-modal select.form-control option {
  background: #1a1a2e !important;
  color: #ffffff !important;
  padding: 8px 12px;
  border: none;
}

.lottery-modal select.form-control option:hover,
.lottery-modal select.form-control option:focus,
.lottery-modal select.form-control option:checked {
  background: linear-gradient(
    135deg,
    var(--neon-blue),
    var(--neon-purple)
  ) !important;
  color: white !important;
}

/* 修復所有select元素 */
.lottery-modal select {
  background: rgba(0, 0, 0, 0.4) !important;
  color: var(--text-primary) !important;
}

.lottery-modal select option {
  background: #1a1a2e !important;
  color: #ffffff !important;
}

/* 網格大小選擇器 */
.lottery-modal .grid-size-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.lottery-modal .grid-size-btn {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-dim);
  color: var(--text-primary);
  padding: 12px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-family: "Orbitron", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lottery-modal .grid-size-btn:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.lottery-modal .grid-size-btn.active {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
  color: white;
}

.lottery-modal .grid-size-number {
  font-size: 1.2rem;
  font-weight: 700;
}

.lottery-modal .grid-size-label {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* 搜尋區域 */
.lottery-modal .search-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.lottery-modal .search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.lottery-modal .search-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.lottery-modal .search-input-container {
  position: relative;
  margin-bottom: 15px;
}

.lottery-modal .search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(0, 245, 255, 0.4);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  font-family: "Orbitron", monospace;
  backdrop-filter: blur(10px);
}

.lottery-modal .search-input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
  background: rgba(0, 0, 0, 0.8);
}

.lottery-modal .search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-family: "Orbitron", monospace;
}

.lottery-modal .search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
}

.lottery-modal .search-btn:hover {
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.lottery-modal .search-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(0, 245, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.lottery-modal .filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lottery-modal .filter-group label {
  font-size: 0.9rem;
  color: var(--neon-blue);
  font-weight: 600;
  font-family: "Orbitron", monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px rgba(0, 245, 255, 0.5);
}

.lottery-modal .price-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lottery-modal .price-input {
  width: 100px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(0, 245, 255, 0.4);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: "Orbitron", monospace;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.lottery-modal .price-input:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
  background: rgba(0, 0, 0, 0.8);
}

.lottery-modal .price-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-family: "Orbitron", monospace;
}

.lottery-modal .price-separator {
  color: var(--neon-blue);
  font-weight: bold;
  font-size: 1.2rem;
  text-shadow: 0 0 5px rgba(0, 245, 255, 0.7);
}

/* 搜尋結果 - 美化版 */
.lottery-modal .search-results {
  margin-top: 20px;
}

.lottery-modal .search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.15),
    rgba(191, 0, 255, 0.1)
  );
  border: 2px solid rgba(0, 245, 255, 0.4);
  border-radius: 10px;
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.lottery-modal .search-results-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 245, 255, 0.05),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

.lottery-modal #search-stats {
  font-family: "Orbitron", monospace;
  font-weight: 600;
  color: var(--neon-blue);
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.6);
  font-size: 1rem;
  position: relative;
  z-index: 2;
}

.lottery-modal #search-count {
  font-family: "Orbitron", monospace;
  font-weight: 700;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255, 222, 0, 0.7);
  font-size: 1rem;
  position: relative;
  z-index: 2;
}

.lottery-modal .search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 245, 255, 0.2);
}

/* 自定義滾動條 - 賽博龐克風格 */
.lottery-modal .search-results-grid::-webkit-scrollbar {
  width: 12px;
}

.lottery-modal .search-results-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(0, 245, 255, 0.2);
}

.lottery-modal .search-results-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.lottery-modal .search-results-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  box-shadow: 0 0 15px rgba(191, 0, 255, 0.7);
}

.lottery-modal .search-results-grid::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0.4);
}

/* 武器卡片 - 賽博龐克風格 */
.lottery-modal .weapon-card {
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.7),
    rgba(20, 20, 40, 0.5)
  );
  border: 2px solid rgba(0, 245, 255, 0.4);
  border-radius: 12px;
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(15px);
  overflow: hidden;
}

.lottery-modal .weapon-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 245, 255, 0.15),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 1;
}

.lottery-modal .weapon-card:hover::before {
  left: 100%;
}

.lottery-modal .weapon-card:hover {
  border-color: var(--neon-blue);
  box-shadow:
    0 0 25px rgba(0, 245, 255, 0.5),
    0 0 50px rgba(0, 245, 255, 0.2),
    inset 0 0 25px rgba(0, 245, 255, 0.1);
  transform: translateY(-4px) scale(1.02);
}

.lottery-modal .weapon-image {
  width: 100%;
  height: 140px;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.1),
    rgba(191, 0, 255, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(0, 245, 255, 0.3);
}

.lottery-modal .weapon-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(0, 245, 255, 0.08) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

.lottery-modal .weapon-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.lottery-modal .weapon-card:hover .weapon-image img {
  transform: scale(1.08);
}

.lottery-modal .weapon-info {
  text-align: center;
  position: relative;
  z-index: 2;
}

.lottery-modal .weapon-name {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.lottery-modal .weapon-skin {
  color: var(--neon-blue);
  font-size: 0.8rem;
  margin-bottom: 8px;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 4px rgba(0, 245, 255, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lottery-modal .weapon-price {
  color: var(--neon-yellow);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 10px;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 10px rgba(255, 222, 0, 0.7);
  letter-spacing: 0.5px;
}

.lottery-modal .weapon-rarity {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.lottery-modal .add-prize-btn {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  font-weight: 600;
  width: 100%;
}

.lottery-modal .add-prize-btn:hover {
  box-shadow: 0 0 10px rgba(191, 0, 255, 0.5);
  transform: translateY(-1px);
}

/* 載入更多按鈕 */
.lottery-modal .load-more-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.lottery-modal .load-more-btn {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border: 2px solid var(--neon-blue);
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 600;
  font-family: "Orbitron", monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lottery-modal .load-more-btn:hover {
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
  transform: translateY(-2px);
}

.lottery-modal .load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lottery-modal .load-more-btn i {
  font-size: 0.9rem;
}

/* 載入和空狀態 - 美化版 */
.lottery-modal .loading-state,
.lottery-modal .no-results,
.lottery-modal .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 30px;
  color: var(--text-primary);
  text-align: center;
  grid-column: 1 / -1;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5),
    rgba(20, 20, 40, 0.4)
  );
  border: 2px solid rgba(0, 245, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(15px);
  margin: 20px;
  position: relative;
  overflow: hidden;
}

.lottery-modal .loading-state::before,
.lottery-modal .no-results::before,
.lottery-modal .error-state::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 245, 255, 0.05),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

.lottery-modal .loading-state i,
.lottery-modal .no-results i,
.lottery-modal .error-state i {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--neon-blue);
  text-shadow: 0 0 15px rgba(0, 245, 255, 0.7);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.lottery-modal .loading-state .fa-spinner {
  animation:
    spin 1s linear infinite,
    pulse 2s ease-in-out infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.lottery-modal .loading-state p,
.lottery-modal .no-results p,
.lottery-modal .error-state p {
  font-size: 1.1rem;
  margin: 0;
  font-family: "Orbitron", monospace;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 2;
}

.lottery-modal .no-results small,
.lottery-modal .error-state small {
  display: block;
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: "Orbitron", monospace;
  position: relative;
  z-index: 2;
}

/* ===== 中獎紀錄樣式 ===== */
.lottery-recent-wins {
  margin-top: 40px;
}

.lottery-recent-wins h2 {
  color: var(--neon-yellow);
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 10px rgba(255, 222, 0, 0.6);
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.wins-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 600px;
  overflow-y: auto;
}

/* 房間連結樣式 */
.room-link {
  color: var(--neon-blue, #00d4ff);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.room-link:hover {
  color: var(--neon-yellow, #ffd700);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  border-bottom-color: var(--neon-yellow, #ffd700);
  transform: translateX(2px);
}

.room-link:active {
  transform: scale(0.98);
}

.win-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6),
    rgba(20, 20, 40, 0.4)
  );
  border: 2px solid rgba(0, 245, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.win-record::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 222, 0, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.win-record:hover {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 20px rgba(255, 222, 0, 0.4);
  transform: translateY(-2px);
}

.win-record:hover::before {
  left: 100%;
}

.winner-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.winner-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.winner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.winner-name {
  font-family: "Orbitron", monospace;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.lottery-room {
  font-size: 0.85rem;
  color: var(--neon-yellow);
  font-family: "Orbitron", monospace;
  font-weight: 500;
  text-shadow: 0 0 3px rgba(255, 222, 0, 0.5);
}

.win-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: "Orbitron", monospace;
}

.win-item {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 2;
  justify-content: center;
}

.item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 245, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-name {
  font-family: "Orbitron", monospace;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-skin {
  font-family: "Orbitron", monospace;
  font-size: 0.8rem;
  color: var(--neon-blue);
  text-shadow: 0 0 3px rgba(0, 245, 255, 0.5);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-value {
  font-family: "Orbitron", monospace;
  font-weight: 700;
  color: var(--neon-yellow);
  font-size: 1.1rem;
  text-shadow: 0 0 8px rgba(255, 222, 0, 0.6);
}

.win-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.draws-to-win {
  font-size: 0.9rem;
  color: var(--neon-blue);
  font-family: "Orbitron", monospace;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0, 245, 255, 0.6);
  padding: 4px 8px;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 4px;
}

.tier-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  min-width: 30px;
  text-align: center;
}

.tier-badge.tier-s {
  background: linear-gradient(135deg, #ff0040, #ff6b35);
  color: white;
  box-shadow: 0 0 15px rgba(255, 0, 64, 0.6);
}

.tier-badge.tier-a {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
}

.tier-badge.tier-b {
  background: linear-gradient(135deg, #f7931e, #ffde00);
  color: black;
  box-shadow: 0 0 15px rgba(247, 147, 30, 0.6);
}

.tier-badge.tier-c {
  background: linear-gradient(135deg, #00ff41, #00f5ff);
  color: black;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
}

.tier-badge.tier-d,
.tier-badge.tier-e,
.tier-badge.tier-f {
  background: linear-gradient(135deg, #666, #999);
  color: white;
  box-shadow: 0 0 15px rgba(102, 102, 102, 0.6);
}

.lottery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  text-align: center;
}

.lottery-loading i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--neon-blue);
  animation: spin 1s linear infinite;
}

.lottery-loading p {
  font-family: "Orbitron", monospace;
  font-size: 1rem;
}

.lottery-no-wins {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  text-align: center;
}

.lottery-no-wins i {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--neon-yellow);
  text-shadow: 0 0 15px rgba(255, 222, 0, 0.6);
}

.lottery-no-wins h3 {
  font-family: "Orbitron", monospace;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.lottery-no-wins p {
  font-family: "Orbitron", monospace;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .win-record {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .winner-info,
  .win-item {
    justify-content: center;
  }

  .item-details {
    align-items: center;
  }
}

/* 表單按鈕 */
.lottery-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dim);
}

.lottery-modal .btn {
  padding: 12px 25px;
  border: 2px solid;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-family: "Orbitron", monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lottery-modal .btn-secondary {
  background: transparent;
  border-color: var(--border-dim);
  color: var(--text-secondary);
}

.lottery-modal .btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.lottery-modal .btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-color: var(--neon-blue);
  color: white;
}

.lottery-modal .btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
  transform: translateY(-2px);
}

.lottery-modal .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.lottery-modal .modal-body {
  padding: 30px;
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

/* 自定義滾動條 */
.lottery-modal .modal-body::-webkit-scrollbar {
  width: 8px;
}

.lottery-modal .modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.lottery-modal .modal-body::-webkit-scrollbar-thumb {
  background: var(--neon-blue);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--neon-blue);
}

.lottery-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--neon-pink);
}

/* ===== 表單樣式 ===== */
.form-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dim);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.form-section::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    transparent
  );
  animation: section-shine 3s ease-in-out infinite;
}

.form-section h4 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-section h4 i {
  color: var(--neon-blue);
  text-shadow: var(--glow-small);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--border-dim);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: "JetBrains Mono", monospace;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 5px;
  display: block;
}

/* ===== 武器搜尋區域 - 賽博龐克風格 ===== */
.prize-search-container {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6),
    rgba(20, 20, 40, 0.4)
  );
  border: 2px solid rgba(0, 245, 255, 0.4);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

/* 移除炫光效果 */

/* 搜尋時容器特效 */
.prize-search-container.searching {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 20px rgba(255, 222, 0, 0.4);
}

/* 移除搜尋時的炫光效果 */

/* 搜尋輸入框 - 專門針對 #prize-search */
#prize-search {
  width: 100%;
  padding: 15px 50px 15px 20px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7),
    rgba(20, 20, 40, 0.5)
  );
  border: 2px solid rgba(0, 245, 255, 0.5);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: "Orbitron", monospace;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

#prize-search::placeholder {
  color: rgba(0, 245, 255, 0.6);
  font-family: "Orbitron", monospace;
  font-weight: 400;
  text-shadow: 0 0 5px rgba(0, 245, 255, 0.3);
}

#prize-search:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow:
    0 0 25px rgba(0, 245, 255, 0.7),
    0 0 50px rgba(0, 245, 255, 0.4),
    inset 0 0 25px rgba(0, 245, 255, 0.15);
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.8),
    rgba(20, 20, 40, 0.6)
  );
  transform: translateY(-3px);
  animation: searchFocus 0.5s ease-out;
}

@keyframes searchFocus {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 5px rgba(0, 245, 255, 0.3);
  }
  50% {
    transform: translateY(-4px);
    box-shadow:
      0 0 30px rgba(0, 245, 255, 0.8),
      0 0 60px rgba(0, 245, 255, 0.5);
  }
  100% {
    transform: translateY(-3px);
    box-shadow:
      0 0 25px rgba(0, 245, 255, 0.7),
      0 0 50px rgba(0, 245, 255, 0.4),
      inset 0 0 25px rgba(0, 245, 255, 0.15);
  }
}

/* 打字時的動態效果 */
#prize-search.typing {
  border-color: var(--neon-yellow);
  box-shadow:
    0 0 15px rgba(255, 222, 0, 0.6),
    0 0 30px rgba(255, 222, 0, 0.3);
  animation: typingPulse 1s ease-in-out infinite;
}

@keyframes typingPulse {
  0%,
  100% {
    box-shadow:
      0 0 15px rgba(255, 222, 0, 0.6),
      0 0 30px rgba(255, 222, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(255, 222, 0, 0.8),
      0 0 40px rgba(255, 222, 0, 0.5);
  }
}

#prize-search:hover {
  border-color: rgba(0, 245, 255, 0.7);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}

.search-input-group {
  position: relative;
  margin-bottom: 20px;
}

.search-input-group input {
  padding-right: 50px;
}

.search-input-group button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  border: 2px solid rgba(191, 0, 255, 0.5);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  box-shadow: 0 0 10px rgba(191, 0, 255, 0.4);
}

.search-input-group button:hover {
  background: linear-gradient(135deg, var(--neon-pink), #ff0040);
  box-shadow:
    0 0 20px rgba(255, 0, 64, 0.6),
    0 0 40px rgba(255, 0, 64, 0.3);
  transform: translateY(-50%) scale(1.1);
  border-color: rgba(255, 0, 64, 0.7);
}

/* 清除搜尋按鈕專用樣式 */
#clear-search {
  background: linear-gradient(
    135deg,
    var(--neon-purple),
    var(--neon-pink)
  ) !important;
  border: 2px solid rgba(191, 0, 255, 0.5) !important;
  color: white !important;
  font-size: 1rem;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#clear-search:hover {
  background: linear-gradient(135deg, var(--neon-pink), #ff0040) !important;
  box-shadow:
    0 0 20px rgba(255, 0, 64, 0.6),
    0 0 40px rgba(255, 0, 64, 0.3) !important;
  transform: translateY(-50%) scale(1.15) !important;
  border-color: rgba(255, 0, 64, 0.8) !important;
}

/* 篩選器 */
.search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.filter-group label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.price-range-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-separator {
  color: var(--text-muted);
  font-weight: bold;
}

.price-input {
  flex: 1;
}

/* 搜尋結果 */
.search-results {
  margin-top: 20px;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-dim);
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* 武器卡片 */
.weapon-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-dim);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.weapon-card:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
  transform: translateY(-3px);
}

.weapon-image {
  width: 100%;
  height: 120px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.weapon-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.weapon-name {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.weapon-skin {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.weapon-price {
  color: var(--neon-green);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-shadow: var(--glow-small);
}

.weapon-rarity {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.add-prize-btn {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.add-prize-btn:hover {
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
  transform: scale(1.05);
}

/* 載入狀態 */
.loading-state,
.no-results,
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.loading-state i {
  font-size: 2rem;
  color: var(--neon-blue);
  margin-bottom: 15px;
  animation: neon-flicker 1s infinite;
}

/* 已選擇的大獎 */
.selected-prizes {
  margin-top: 25px;
}

.selected-prizes h5 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.no-prizes {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  border: 2px dashed var(--border-dim);
  border-radius: 10px;
}

/* 價格預覽 */
.price-preview {
  background: rgba(0, 245, 255, 0.1);
  border: 2px solid var(--neon-blue);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.price-item.main-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neon-blue);
  border-top: 1px solid var(--border-dim);
  padding-top: 15px;
  margin-top: 15px;
  text-shadow: var(--glow-small);
}

.price-warning {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  margin-top: 10px;
  background: linear-gradient(
    135deg,
    rgba(255, 0, 64, 0.15),
    rgba(255, 107, 53, 0.1)
  );
  border: 2px solid rgba(255, 0, 64, 0.5);
  border-radius: 8px;
  color: #ff0040;
  font-family: "Orbitron", monospace;
  font-weight: 600;
  font-size: 0.9rem;
  animation: warningPulse 2s ease-in-out infinite;
}

.price-warning i {
  color: #ff0040;
  font-size: 1.1rem;
  text-shadow: 0 0 8px rgba(255, 0, 64, 0.6);
}

@keyframes warningPulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.6);
  }
}

.price-formula {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 10px;
}

/* ===== 表單按鈕 ===== */
.form-actions {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid var(--border-dim);
}

.cancel-btn,
.submit-btn {
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Orbitron", monospace;
  position: relative;
  overflow: hidden;
}

.cancel-btn {
  background: rgba(255, 0, 64, 0.2);
  border: 2px solid var(--cyber-danger);
  color: var(--cyber-danger);
}

.cancel-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 64, 0.2),
    transparent
  );
  transition: var(--transition);
}

.cancel-btn:hover {
  border-color: var(--cyber-danger);
  box-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
}

.cancel-btn:hover::before {
  left: 100%;
}

.submit-btn {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border: 2px solid var(--neon-blue);
  color: var(--text-primary);
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: var(--transition);
}

.submit-btn:hover {
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
}

.submit-btn:hover::before {
  left: 100%;
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
  .lottery-header h1 {
    font-size: 2.5rem;
  }

  .lottery-rules-content {
    grid-template-columns: 1fr;
  }

  .create-room-btn {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .lottery-boxes-grid {
    grid-template-columns: 1fr;
  }

  #create-lottery-modal.lottery-modal .modal-content {
    width: 95% !important;
    margin: 10px !important;
  }

  .search-filters {
    grid-template-columns: 1fr;
  }

  .price-range-group {
    flex-direction: column;
    gap: 8px;
  }

  .price-separator {
    display: none;
  }

  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .lottery-main {
    padding: 10px;
  }

  .lottery-header h1 {
    font-size: 2rem;
  }

  #create-lottery-modal.lottery-modal {
    padding: 5px !important;
  }

  .lottery-modal .modal-header,
  .lottery-modal .modal-body {
    padding: 20px;
  }

  .weapon-card {
    min-width: auto;
  }

  .search-results-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 載入動畫 ===== */
@keyframes loadingPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.s-prize-remaining.loading {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

/* ===== 毛玻璃效果增強 ===== */
.lottery-box-price,
.s-prize-remaining,
.price-preview,
.form-section {
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
}

/* ===== 額外視覺效果 ===== */
.lottery-box-card:hover .lottery-box-title {
  text-shadow: 0 0 10px var(--neon-blue);
}

.weapon-card:hover .weapon-name {
  text-shadow: 0 0 8px var(--neon-blue);
}

/* ===== 自定義選擇樣式 ===== */
select::-ms-expand {
  display: none;
}

.form-group select::-webkit-appearance,
.filter-group select::-webkit-appearance {
  -webkit-appearance: none;
}

.form-group select::-moz-appearance,
.filter-group select::-moz-appearance {
  -moz-appearance: none;
}

/* 確保按鈕和輸入框的字體一致 */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* 確保所有文字都有適當的行高 */
* {
  line-height: 1.4;
}
