/* ========================================
   场景选择页样式 - 全屏背景 + 大卡片
   3A大作游戏感设计
   ======================================== */

/* ========================================
   全屏容器
   ======================================== */

.scenes-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  /* 深色渐变背景作为fallback */
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
}

/* 背景图 */
.scenes-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.scenes-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) saturate(0.8);
}

/* 毛玻璃叠加层 */
.scenes-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1;
}

/* ========================================
   头部区域
   ======================================== */

.scenes-header {
  position: relative;
  z-index: 10;
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.scenes-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.scenes-header p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
}

/* ========================================
   场景卡片区域
   ======================================== */

.scenes-section {
  position: relative;
  z-index: 10;
  padding: 2rem;
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
}

.scenes-section .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

/* 说明文本 */
.scenes-intro {
  text-align: center;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  padding: 0 2rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* 场景网格 - 水平滚动大卡片 */
.scenes-grid {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.scenes-grid::-webkit-scrollbar {
  height: 6px;
}

.scenes-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.scenes-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.scenes-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* ========================================
   场景大卡片 - 25%宽 75%高
   ======================================== */

.scene-card {
  flex: 0 0 calc(25% - 1.5rem);
  min-width: 320px;
  height: 75vh;
  max-height: 800px;
  min-height: 500px;
  scroll-snap-align: start;
  
  /* 毛玻璃效果 */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-2xl);
  
  overflow: hidden;
  cursor: pointer;
  position: relative;
  
  display: flex;
  flex-direction: column;
  
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.scene-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.6) 100%
  );
  opacity: 0.8;
  transition: opacity var(--transition-slow);
  pointer-events: none;
  z-index: 1;
}

.scene-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 35px 60px -15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scene-card:hover::before {
  opacity: 0.6;
}

/* 卡片图片区域 */
.scene-card-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.scene-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scene-card:hover .scene-card-image img {
  transform: scale(1.08);
}

/* 默认占位图标 */
.scene-card-image .placeholder-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.3);
}

/* 卡片内容区域 */
.scene-card-content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scene-card-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.scene-card-theme {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.scene-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.scene-card-description {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片底部操作 */
.scene-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.scene-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition-normal);
}

.scene-card-action svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-normal);
}

.scene-card:hover .scene-card-action {
  gap: 0.75rem;
}

.scene-card:hover .scene-card-action svg {
  transform: translateX(4px);
}

/* ========================================
   加载状态
   ======================================== */

.loading-container {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 1.5rem;
}

/* 覆盖 display:flex，确保 hidden 时真正隐藏 */
.loading-container.hidden {
  display: none !important;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-container .text-muted {
  color: rgba(255, 255, 255, 0.6);
}

/* 空状态 */
.empty-state {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state-text {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1400px) {
  .scene-card {
    flex: 0 0 calc(33.333% - 1.33rem);
  }
}

@media (max-width: 1024px) {
  .scene-card {
    flex: 0 0 calc(50% - 1rem);
    height: 65vh;
    min-height: 450px;
  }
  
  .scenes-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .scenes-header {
    padding: 2rem 1rem 1rem;
  }
  
  .scenes-header h1 {
    font-size: 1.75rem;
  }
  
  .scenes-header p {
    font-size: 1rem;
  }
  
  .scenes-section {
    padding: 1rem;
  }
  
  /* 手机端：2 列多行，卡片 48% 宽、9:16 比例 */
  .scenes-grid {
    display: grid;
    grid-template-columns: 48% 48%;
    column-gap: 4%;
    row-gap: 0.75rem;
    overflow: visible;
    padding: 1rem 0;
    scroll-snap-type: none;
  }
  
  .scene-card {
    flex: none;
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 9 / 16;
    min-height: 0;
    max-height: none;
  }
  
  .scene-card-content {
    padding: 1rem;
  }
  
  .scene-card-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .scenes-grid {
    grid-template-columns: 48% 48%;
    column-gap: 4%;
  }
  
  .scene-card {
    aspect-ratio: 9 / 16;
  }
}
