/* 抽抽樂詳細頁面樣式 */

.lottery-detail-main-container {
  min-height: 100vh;
  padding: 80px 20px 40px;
  background: linear-gradient(to bottom, #1a1a2e, #0f0f1e);
}

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

.lottery-detail-header-content h1 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 10px;
}

.lottery-detail-header-content p {
  color: #b3b3b3;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.lottery-detail-lottery-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
}

.lottery-detail-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lottery-detail-stat-label {
  color: #888;
  font-size: 0.9rem;
  font-family: var(--font-main);
}

.lottery-detail-stat-value {
  color: #4caf50;
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 5px;
}

/* 一番賞網格 */
.lottery-detail-lottery-grid-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
}

.lottery-detail-grid-container {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  max-width: 100%;
}

.lottery-detail-lottery-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lottery-detail-lottery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lottery-detail-lottery-cell:not(.opened):hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.lottery-detail-lottery-cell.opened {
  cursor: not-allowed;
  opacity: 0.5;
}

.lottery-detail-lottery-cell.opened::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.lottery-detail-lottery-cell.empty {
  background: transparent;
  cursor: default;
}

.lottery-detail-lottery-cell.empty:hover {
  transform: none;
  box-shadow: none;
}

/* 抽獎控制區 */
.lottery-detail-lottery-controls {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.lottery-detail-balance-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.1rem;
}

.lottery-detail-balance-amount {
  color: #4caf50;
  font-weight: bold;
}

.lottery-detail-back-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lottery-detail-back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

/* 結果彈窗 */
.lottery-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lottery-detail-modal-content {
  background: #1a1a2e;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lottery-detail-modal-header {
  background: linear-gradient(135deg, #4caf50, #45a049);
  padding: 20px;
  text-align: center;
  position: relative;
}

.lottery-detail-modal-header h2 {
  color: #fff;
  margin: 0;
}

.lottery-detail-close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

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

.lottery-detail-modal-body {
  padding: 30px;
  text-align: center;
}

.lottery-detail-result-item img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
}

.lottery-detail-result-item h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.lottery-detail-item-rarity {
  color: #888;
  margin-bottom: 10px;
}

.lottery-detail-item-value {
  color: #4caf50;
  font-size: 1.3rem;
  font-weight: bold;
}

.lottery-detail-modal-footer {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  gap: 15px;
}

.lottery-detail-primary-button,
.lottery-detail-secondary-button {
  padding: 10px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.lottery-detail-primary-button {
  background: #4caf50;
  color: #fff;
}

.lottery-detail-primary-button:hover {
  background: #45a049;
}

.lottery-detail-secondary-button {
  background: transparent;
  color: #4caf50;
  border: 1px solid #4caf50;
}

.lottery-detail-secondary-button:hover {
  background: #4caf50;
  color: #fff;
}

/* 載入中覆蓋層 */
.lottery-detail-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.lottery-detail-loading-spinner {
  text-align: center;
  color: #fff;
}

.lottery-detail-loading-spinner i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #4caf50;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .lottery-detail-grid-container {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .lottery-detail-lottery-stats {
    flex-direction: column;
    gap: 15px;
  }

  .lottery-detail-lottery-controls {
    flex-direction: column;
    gap: 20px;
  }

  .lottery-detail-result-item img {
    width: 150px;
    height: 150px;
  }
}
