/* Spirits Hero */
.spirits-hero {
  background: linear-gradient(180deg, var(--dark-ink) 0%, rgba(30, 73, 59, 0.1) 50%, var(--dark-ink) 100%);
  padding-top: 140px;
}

.spirits-intro {
  max-width: 900px;
  margin: 48px auto 60px;
  text-align: center;
}

.spirits-intro p {
  color: rgba(245, 237, 224, 0.75);
  line-height: 2;
  font-size: 1.05rem;
}

/* Spirit Selector */
.spirit-selector {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.spirit-tab {
  padding: 14px 36px;
  background: transparent;
  border: 2px solid rgba(212, 175, 55, 0.25);
  color: var(--cloud-white);
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
}

.spirit-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.5s ease;
}

.spirit-tab:hover::before {
  left: 100%;
}

.spirit-tab:hover,
.spirit-tab.active {
  background: var(--gradient-tea);
  border-color: var(--gold);
  color: var(--cloud-white);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(30, 73, 59, 0.4);
}

/* Spirit Showcase */
.spirit-showcase {
  background: var(--dark-ink);
}

.spirit-detail {
  display: none;
  animation: fadeInUp 0.6s ease-out;
}

.spirit-detail.active {
  display: block;
}

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

.spirit-profile {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
}

/* Avatar Large */
.spirit-avatar-large {
  position: relative;
  width: 380px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  overflow: hidden;
}

.avatar-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent);
  border-radius: 50%;
  animation: avatar-pulse 4s infinite ease-in-out;
}

@keyframes avatar-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.avatar-ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 2px solid rgba(212, 175, 55, 0.25);
  border-radius: 50%;
}

.avatar-ring.rotating {
  animation: ring-spin 20s infinite linear;
}

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

.avatar-character {
  font-size: 8rem;
  position: relative;
  z-index: 2;
  animation: character-float 4s infinite ease-in-out;
}

@keyframes character-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.float-element {
  position: absolute;
  font-size: 2rem;
  animation: float-around 6s infinite ease-in-out;
  opacity: 0.7;
}

.float-element:nth-child(1) {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.float-element:nth-child(2) {
  top: 30%;
  right: 18%;
  animation-delay: 2s;
}

.float-element:nth-child(3) {
  bottom: 25%;
  left: 22%;
  animation-delay: 4s;
}

@keyframes float-around {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg); 
    opacity: 0.7; 
  }
  33% { 
    transform: translate(15px, -20px) rotate(120deg); 
    opacity: 1; 
  }
  66% { 
    transform: translate(-10px, 15px) rotate(240deg); 
    opacity: 0.85; 
  }
}

/* Theme Colors */
.lingxi-theme {
  background: linear-gradient(135deg, rgba(176, 190, 197, 0.15), rgba(16, 20, 24, 0.9));
  border: 2px solid rgba(176, 190, 197, 0.25);
}

.guxuan-theme {
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.15), rgba(16, 20, 24, 0.9));
  border: 2px solid rgba(46, 125, 50, 0.25);
}

.moyin-theme {
  background: linear-gradient(135deg, rgba(69, 90, 100, 0.15), rgba(16, 20, 24, 0.9));
  border: 2px solid rgba(69, 90, 100, 0.25);
}

.qianyan-theme {
  background: linear-gradient(135deg, rgba(121, 85, 72, 0.15), rgba(16, 20, 24, 0.9));
  border: 2px solid rgba(121, 85, 72, 0.25);
}

/* Info Panel */
.spirit-info-panel {
  background: rgba(16, 20, 24, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 20px;
  padding: 40px;
}

.info-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.info-header h2 {
  font-size: 2.5rem;
  color: var(--cloud-white);
  margin-bottom: 12px;
  font-weight: 700;
}

.spirit-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.white-tea {
  background: rgba(176, 190, 197, 0.15);
  color: #b0bec5;
  border: 1px solid rgba(176, 190, 197, 0.35);
}

.puer-tea {
  background: rgba(46, 125, 50, 0.15);
  color: #66bb6a;
  border: 1px solid rgba(46, 125, 50, 0.35);
}

.liubao-tea {
  background: rgba(69, 90, 100, 0.15);
  color: #90a4ae;
  border: 1px solid rgba(69, 90, 100, 0.35);
}

.anhua-tea {
  background: rgba(121, 85, 72, 0.15);
  color: #bcaaa4;
  border: 1px solid rgba(121, 85, 72, 0.35);
}

.info-section {
  margin-bottom: 28px;
}

.info-section h3 {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}

.info-section p {
  color: rgba(245, 237, 224, 0.75);
  line-height: 1.9;
  font-size: 1rem;
}

/* Traits Grid */
.traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.trait {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(30, 73, 59, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.trait:hover {
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(5px);
}

.trait-icon {
  font-size: 1.4rem;
}

.trait span:last-child {
  color: rgba(245, 237, 224, 0.85);
  font-size: 0.95rem;
}

/* Skills List */
.skills-list {
  list-style: none;
}

.skills-list li {
  padding: 12px 0;
  color: rgba(245, 237, 224, 0.75);
  line-height: 1.7;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  font-size: 0.98rem;
}

.skills-list li strong {
  color: var(--gold);
}

.skills-list li:last-child {
  border-bottom: none;
}

/* Voice */
.voice-desc {
  margin-bottom: 16px !important;
}

.btn-audio {
  padding: 10px 24px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.92rem;
}

.btn-audio:hover {
  background: var(--gold);
  color: var(--dark-ink);
  transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

/* Environment */
.spirit-environment {
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 30px;
}

.env-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(2px);
}

.env-label {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  color: var(--cloud-white);
  font-weight: 600;
  letter-spacing: 3px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.lingxi-env {
  background: linear-gradient(to bottom, rgba(176, 190, 197, 0.3), rgba(144, 164, 174, 0.6)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="15" fill="%23ffffff" opacity="0.1"/></svg>');
  background-size: cover;
}

.guxuan-env {
  background: linear-gradient(to bottom, rgba(46, 125, 50, 0.3), rgba(27, 94, 32, 0.6)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="45" y="20" width="10" height="60" fill="%232e7d32" opacity="0.2"/></svg>');
  background-size: cover;
}

.moyin-env {
  background: linear-gradient(to bottom, rgba(69, 90, 100, 0.3), rgba(38, 50, 56, 0.6)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><ellipse cx="50" cy="70" rx="40" ry="10" fill="%23455a64" opacity="0.2"/></svg>');
  background-size: cover;
}

.qianyan-env {
  background: linear-gradient(to bottom, rgba(121, 85, 72, 0.3), rgba(78, 52, 46, 0.6)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,20 70,60 30,60" fill="%23795548" opacity="0.2"/></svg>');
  background-size: cover;
}

/* Interaction Preview */
.interaction-preview {
  background: linear-gradient(180deg, var(--dark-ink) 0%, rgba(30, 73, 59, 0.08) 50%, var(--dark-ink) 100%);
}

.features-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
  margin-top: 80px;
}

.feature-card {
  background: rgba(16, 20, 24, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  font-size: 1.4rem;
  color: var(--cloud-white);
  margin-bottom: 14px;
  font-weight: 600;
}

.feature-card p {
  color: rgba(245, 237, 224, 0.65);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .spirit-profile {
    grid-template-columns: 320px 1fr;
    gap: 40px;
  }

  .spirit-avatar-large {
    width: 320px;
    height: 420px;
  }

  .avatar-character {
    font-size: 6rem;
  }

  .avatar-ring {
    width: 240px;
    height: 240px;
  }
}

@media (max-width: 768px) {
  .spirits-hero {
    padding-top: 120px;
  }

  .spirit-selector {
    gap: 10px;
  }

  .spirit-tab {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .spirit-profile {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .spirit-avatar-large {
    width: 100%;
    max-width: 340px;
    height: 400px;
    margin: 0 auto;
  }

  .avatar-character {
    font-size: 6rem;
  }

  .spirit-info-panel {
    padding: 28px;
  }

  .info-header h2 {
    font-size: 2rem;
  }

  .traits-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .features-preview {
    grid-template-columns: 1fr;
  }

  .spirit-environment {
    height: 250px;
  }
}
