/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

#app {
  min-height: 100vh;
  padding-bottom: 50px;
}

/* 页面切换 */
.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* 首页 */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  color: white;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 20px;
}

.menu-card {
  background: white;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 0,0,40px rgba(0,0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.card-desc {
  font-size: 0.9rem;
  color: #666;
}

.footer {
  text-align: center;
  padding: 30px;
  color: white;
  opacity: 0.8;
}

/* 页面头部 */
.page-header {
  background: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  background: #f0f0f0;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  color: #333;
}

.page-header h2 {
  flex: 1;
  text-align: center;
  font-size: 1.3rem;
  color: #333;
}

.page-content {
  padding: 20px;
}

/* 介绍框 */
.intro-box {
  background: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.intro-box p {
  color: #666;
  line-height: 1.6;
}

/* 抽牌按钮 */
.draw-btn {
  display: block;
  width: 200px;
  margin: 0 auto 30px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
  transition: all 0.3s ease;
}

.draw-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(245, 87, 108, 0.5);
}

.draw-btn:active {
  transform: scale(0.98);
}

/* 家族选择 */
.card-category {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.cat-item {
  background: white;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.cat-item.drawn {
  background: #4CAF50;
  color: white;
}

.cat-icon {
  font-size: 1.2rem;
}

/* 已抽卡牌展示 */
.drawn-cards {
  margin: 20px 0;
}

.drawn-cards .hint {
  text-align: center;
  color: white;
  opacity: 0.8;
}

.drawn-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.drawn-card:hover {
  transform: scale(1.02);
}

.drawn-card-inner {
  display: flex;
  padding: 15px;
  gap: 15px;
}

.drawn-card img {
  width: 100px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
}

.drawn-card-info {
  flex: 1;
}

.drawn-card-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.drawn-card-category {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.drawn-card-meaning {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 十一之阵金字塔 */
.pyramid {
  margin: 20px auto;
  max-width: 300px;
}

.pyramid-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pyramid-slot {
  width: 60px;
  height: 80px;
  background: rgba(255,255,255,0.3);
  border: 2px dashed rgba(255,255,255,0.6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pyramid-slot:hover {
  background: rgba(255,255,255,0.5);
}

.pyramid-slot.filled {
  background: white;
  border: none;
  overflow: hidden;
}

.pyramid-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 卡牌详情页 */
.card-detail {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.card-full-img {
  width: 100%;
  display: block;
}

.card-info {
  padding: 25px;
}

.card-info h3 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.meaning-box, .number-box {
  margin-bottom: 20px;
}

.meaning-box h4, .number-box h4 {
  font-size: 1rem;
  color: #333;
  margin-bottom: 8px;
}

.meaning-box p, .number-box p {
  color: #666;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* 使用说明 */
.guide-section {
  background: white;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 15px;
}

.guide-section h3 {
  color: #333;
  margin-bottom: 12px;
}

.guide-section p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 10px;
}

/* 关于 */
.about-box {
  background: white;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
}

.about-box h3 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 10px;
}

.about-box hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #eee;
}

.about-box p {
  color: #666;
  line-height: 1.8;
}

/* 重置按钮 */
.reset-btn {
  display: block;
  width: 150px;
  margin: 30px auto 0;
  padding: 12px 25px;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid white;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset-btn:hover {
  background: white;
  color: #764ba2;
}

/* 响应式 */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .menu-grid {
    gap: 12px;
    padding: 15px;
  }
  
  .menu-card {
    padding: 20px 15px;
  }
  
  .card-icon {
    font-size: 2.5rem;
  }
  
  .drawn-card-inner {
    flex-direction: column;
  }
  
  .drawn-card img {
    width: 100%;
    height: auto;
  }
}
