* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  /* 移动端优化 */
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}

/* 添加高级背景效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  width: 100%;
  background: rgba(15, 15, 25, 0.95);
  border-radius: 25px;
  padding: 30px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  margin: 0 auto;
  /* 移动端优化 */
  min-height: auto;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  border-radius: 25px;
  pointer-events: none;
}

.title {
  text-align: center;
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 40px;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 30px rgba(255, 255, 255, 0.1);
  animation: glow 3s ease-in-out infinite alternate;
  font-weight: 300;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
  /* 移动端优化 */
  word-wrap: break-word;
  hyphens: auto;
}

@keyframes glow {
  from {
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 255, 255, 0.3),
      0 0 30px rgba(255, 255, 255, 0.1);
  }

  to {
    text-shadow:
      0 0 20px rgba(255, 255, 255, 0.8),
      0 0 30px rgba(255, 255, 255, 0.5),
      0 0 40px rgba(255, 255, 255, 0.3),
      0 0 50px rgba(120, 119, 198, 0.2);
  }
}

.lottery-section {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.lottery-row {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.lottery-row.top {
  justify-content: center;
}

.lottery-row.bottom {
  justify-content: center;
}

.lottery-box {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 40, 0.9));
  border-radius: 20px;
  padding: 25px;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  /* 移动端优化 */
  min-width: 0;
  flex: 1;
}

.lottery-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  border-radius: 20px;
  pointer-events: none;
}

.lottery-box:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lottery-box h2 {
  text-align: center;
  color: #ffffff;
  margin-bottom: 25px;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  /* 移动端优化 */
  word-wrap: break-word;
}

.slot-machine {
  position: relative;
  height: 220px;
  width: 220px;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.slot-machine::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  border-radius: 20px;
  pointer-events: none;
}

/* 移除中间指示器 */

.slot-container {
  display: flex;
  height: 100%;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 220px;
  /* 放大一点 */
  overflow: hidden;
  /* 隐藏超出部分 */
}

.slot-item {
  min-width: 220px;
  width: 220px;
  /* 放大一点 */
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ecf0f1, #bdc3c7);
  border-right: 2px solid #34495e;
  position: relative;
  flex-shrink: 0;
  transition: opacity 0.1s ease;
  /* 添加闪动过渡效果 */
  position: absolute;
  /* 绝对定位，让所有物品重叠 */
  left: 0;
  top: 0;
}

.slot-item:last-child {
  border-right: none;
}

.slot-item img {
  width: 200px;
  height: 200px;
  border-radius: 15px;
  object-fit: contain;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
}

.slot-item:hover img {
  transform: scale(1.1);
}

.slot-item.selected {
  background: linear-gradient(145deg, #27ae60, #2ecc71);
  box-shadow: 0 0 25px rgba(39, 174, 96, 0.9);
  border: 2px solid #27ae60;
}

.slot-item.selected img {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.slot-item.center-position {
  background: linear-gradient(145deg, #e74c3c, #c0392b);
  box-shadow: 0 0 25px rgba(231, 76, 60, 0.9);
  border: 2px solid #e74c3c;
}

.slot-item.center-position img {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.control-section {
  text-align: center;
  margin: 30px 0;
}

.start-btn {
  background: linear-gradient(145deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 20px 40px;
  font-size: 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 10px 20px rgba(231, 76, 60, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  font-weight: 600;
  letter-spacing: 1px;
  /* 移动端优化 */
  min-height: 60px;
  min-width: 200px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.start-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: left 0.5s;
}

.start-btn:hover::before {
  left: 100%;
}

.start-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 15px 30px rgba(231, 76, 60, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.start-btn:active {
  transform: translateY(-1px);
}

.start-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.result {
  margin-top: 20px;
  padding: 15px 25px;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  animation: bounce 0.6s ease-out;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  /* 移动端优化 */
  word-wrap: break-word;
  hyphens: auto;
}

.result.success {
  background: linear-gradient(145deg, rgba(39, 174, 96, 0.2), rgba(46, 204, 113, 0.2));
  border-color: #27ae60;
  color: #2ecc71;
}

.result.info {
  background: linear-gradient(145deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.2));
  border-color: #3498db;
  color: #5dade2;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

.audio-control {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-btn,
.volume-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #3498db, #2980b9);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
  /* 移动端优化 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.audio-btn:hover,
.volume-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.audio-btn.muted .audio-icon {
  opacity: 0.5;
}

.volume-btn {
  position: relative;
}

.volume-btn:hover::after {
  content: '音量';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.audio-status {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.audio-control:hover .audio-status {
  opacity: 1;
}

.corner-decoration {
  position: fixed;
  width: 100px;
  height: 100px;
  z-index: 999;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.corner-decoration:hover {
  opacity: 1;
}

.corner-decoration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.corner-decoration.top-left {
  top: 20px;
  left: 20px;
}

.corner-decoration.top-right {
  top: 20px;
  right: 20px;
}

.corner-decoration.bottom-left {
  bottom: 20px;
  left: 20px;
}

.corner-decoration.bottom-right {
  bottom: 20px;
  right: 20px;
}

/* 移除滚动动画 */

/* 响应式设计 - 增强移动端适配 */
@media (max-width: 1024px) {
  .container {
    padding: 25px;
    margin: 10px;
  }

  .title {
    font-size: 2.5rem;
    margin-bottom: 30px;
  }

  .lottery-section {
    gap: 20px;
    max-width: 100%;
  }

  .lottery-row {
    gap: 20px;
  }

  .lottery-box {
    padding: 20px;
  }

  .lottery-box h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .slot-machine {
    height: 200px;
    width: 200px;
  }

  .slot-container {
    width: 200px;
  }

  .slot-item {
    min-width: 200px;
    width: 200px;
  }

  .slot-item img {
    width: 180px;
    height: 180px;
  }

  .start-btn {
    padding: 18px 35px;
    font-size: 1.3rem;
    min-height: 55px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
    border-radius: 20px;
  }

  .title {
    font-size: 2rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
  }

  .lottery-section {
    gap: 15px;
    margin-bottom: 25px;
  }

  .lottery-row {
    gap: 15px;
    flex-direction: column;
    align-items: center;
  }

  .lottery-box {
    padding: 15px;
    border-radius: 15px;
    width: 100%;
    max-width: 300px;
  }

  .lottery-box h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .slot-machine {
    height: 180px;
    width: 180px;
    border-radius: 15px;
  }

  .slot-container {
    width: 180px;
  }

  .slot-item {
    min-width: 180px;
    width: 180px;
  }

  .slot-item img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
  }

  .start-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 40px;
    min-height: 50px;
    min-width: 180px;
  }

  .result {
    font-size: 1rem;
    padding: 12px 20px;
    margin-top: 15px;
  }

  .control-section {
    margin: 20px 0;
  }

  /* 移动端音频控制优化 */
  .audio-control {
    top: 10px;
    right: 10px;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
  }

  .audio-btn,
  .volume-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .audio-status {
    font-size: 0.7rem;
  }

  /* 移动端装饰图片优化 */
  .corner-decoration {
    width: 60px;
    height: 60px;
  }

  .corner-decoration.top-left,
  .corner-decoration.top-right {
    top: 10px;
  }

  .corner-decoration.bottom-left,
  .corner-decoration.bottom-right {
    bottom: 10px;
  }

  .corner-decoration.top-left,
  .corner-decoration.bottom-left {
    left: 10px;
  }

  .corner-decoration.top-right,
  .corner-decoration.bottom-right {
    right: 10px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  .container {
    padding: 15px;
    border-radius: 15px;
  }

  .title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
  }

  .lottery-section {
    gap: 12px;
    margin-bottom: 20px;
  }

  .lottery-row {
    gap: 12px;
  }

  .lottery-box {
    padding: 12px;
    border-radius: 12px;
    max-width: 280px;
  }

  .lottery-box h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .slot-machine {
    height: 160px;
    width: 160px;
    border-radius: 12px;
  }

  .slot-container {
    width: 160px;
  }

  .slot-item {
    min-width: 160px;
    width: 160px;
  }

  .slot-item img {
    width: 140px;
    height: 140px;
    border-radius: 10px;
  }

  .start-btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 35px;
    min-height: 45px;
    min-width: 160px;
  }

  .result {
    font-size: 0.9rem;
    padding: 10px 15px;
    margin-top: 12px;
    border-radius: 10px;
  }

  .control-section {
    margin: 15px 0;
  }

  /* 超小屏幕音频控制 */
  .audio-control {
    top: 5px;
    right: 5px;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
  }

  .audio-btn,
  .volume-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .audio-status {
    font-size: 0.6rem;
  }

  /* 超小屏幕装饰图片 */
  .corner-decoration {
    width: 50px;
    height: 50px;
  }

  .corner-decoration.top-left,
  .corner-decoration.top-right {
    top: 5px;
  }

  .corner-decoration.bottom-left,
  .corner-decoration.bottom-right {
    bottom: 5px;
  }

  .corner-decoration.top-left,
  .corner-decoration.bottom-left {
    left: 5px;
  }

  .corner-decoration.top-right,
  .corner-decoration.bottom-right {
    right: 5px;
  }
}

/* 横屏模式优化 */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    padding: 5px;
  }

  .container {
    padding: 10px;
  }

  .title {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .lottery-section {
    gap: 10px;
    margin-bottom: 15px;
  }

  .lottery-row {
    gap: 10px;
  }

  .lottery-box {
    padding: 10px;
  }

  .lottery-box h2 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .slot-machine {
    height: 120px;
    width: 120px;
  }

  .slot-container {
    width: 120px;
  }

  .slot-item {
    min-width: 120px;
    width: 120px;
  }

  .slot-item img {
    width: 100px;
    height: 100px;
  }

  .start-btn {
    padding: 8px 20px;
    font-size: 1rem;
    min-height: 40px;
  }

  .result {
    font-size: 0.8rem;
    padding: 8px 12px;
    margin-top: 10px;
  }
}

/* 装备栏样式 */
.inventory-section {
  margin-top: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.inventory-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  border-radius: 20px;
  pointer-events: none;
}

.inventory-section h2 {
  text-align: center;
  color: #ffffff;
  margin-bottom: 25px;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  min-height: 100px;
}

.inventory-item {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 40, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  transition: all 0.4s ease;
  animation: itemAppear 0.5s ease-out;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.inventory-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  border-radius: 15px;
  pointer-events: none;
}

.inventory-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.3);
  background: linear-gradient(145deg, rgba(40, 40, 60, 0.9), rgba(30, 30, 50, 0.9));
}

.inventory-item img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  margin-bottom: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.1);
}

.inventory-item .item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  /* 移动端优化 */
  word-wrap: break-word;
  hyphens: auto;
}

.inventory-item .item-time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1;
}

@keyframes itemAppear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 空装备栏提示 */
.inventory-grid:empty::after {
  content: "暂无获得装备";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  color: #999;
  font-style: italic;
  grid-column: 1 / -1;
}

/* 移动端装备栏优化 */
@media (max-width: 768px) {
  .inventory-section {
    margin-top: 25px;
    padding: 20px;
    border-radius: 15px;
  }

  .inventory-section h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .inventory-item {
    padding: 12px;
    border-radius: 12px;
  }

  .inventory-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 6px;
  }

  .inventory-item .item-name {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .inventory-item .item-time {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .inventory-section {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
  }

  .inventory-section h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
  }

  .inventory-item {
    padding: 10px;
    border-radius: 10px;
  }

  .inventory-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
  }

  .inventory-item .item-name {
    font-size: 0.7rem;
    margin-bottom: 5px;
  }

  .inventory-item .item-time {
    font-size: 0.6rem;
  }
}

/* 粒子效果样式 */
.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0;
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}