/**
 * =====================================================
 * 2026 VIVEN 레벨디자인 해커톤
 * Team 슬라이드 스타일
 * =====================================================
 * 팀 발표용 슬라이드
 */

/*
  사용 예시 HTML:
  <section class="slide slide--team">
    <div class="slide__content">
      <div class="team-badge">
        <span class="team-badge__order">1</span>
        <span class="team-badge__label">번째 발표</span>
      </div>
      <h1 class="team-name">팀 이름</h1>
      <div class="team-members">
        <span class="team-member">멤버1</span>
        <span class="team-member">멤버2</span>
        <span class="team-member">멤버3</span>
      </div>
      <div class="team-next">
        다음 발표: <strong>다음 팀 이름</strong>
      </div>
    </div>
  </section>
*/

/* =====================================================
 * 팀 슬라이드 레이아웃
 * ===================================================== */

.slide--team .slide__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--space-xl);
}

/* =====================================================
 * 발표 순서 배지
 * ===================================================== */

.team-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  background: rgba(106, 171, 191, 0.15);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-full);
  animation: badgeReveal 0.5s ease-out;
}

.team-badge__order {
  font-size: var(--fs-subtitle);
  font-weight: var(--fw-black);
  color: var(--accent-primary);
  line-height: 1;
}

.team-badge__label {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

@keyframes badgeReveal {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =====================================================
 * 팀 이름
 * ===================================================== */

.team-name {
  font-size: clamp(72px, 10vw, 140px);
  font-weight: var(--fw-black);
  color: var(--text-primary);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  animation: teamNameReveal 0.6s ease-out 0.1s both;
}

/* 그라데이션 버전 */
.team-name--gradient {
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent-primary) 50%,
    var(--text-primary) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: teamNameReveal 0.6s ease-out 0.1s both, gradientShift 5s ease-in-out infinite;
}

@keyframes teamNameReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* =====================================================
 * 팀 멤버
 * ===================================================== */

.team-members {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  animation: membersReveal 0.5s ease-out 0.2s both;
}

.team-member {
  font-size: var(--fs-subtitle);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  position: relative;
}

/* 구분자 */
.team-member:not(:last-child)::after {
  content: '·';
  position: absolute;
  right: calc(-1 * var(--space-lg) / 2 - 4px);
  color: var(--text-muted);
}

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

/* 멤버 카드 스타일 (선택) */
.team-members--cards {
  gap: var(--space-md);
}

.team-members--cards .team-member {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: var(--fs-body);
}

.team-members--cards .team-member::after {
  display: none;
}

/* =====================================================
 * 다음 팀 표시
 * ===================================================== */

.team-next {
  font-size: var(--fs-body);
  color: var(--text-muted);
  margin-top: var(--space-2xl);
  animation: nextReveal 0.4s ease-out 0.3s both;
}

.team-next strong {
  color: var(--accent-primary);
  font-weight: var(--fw-semibold);
}

@keyframes nextReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =====================================================
 * 팀 카드 그리드 (팀 목록용)
 * ===================================================== */

.team-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  width: 100%;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: var(--transition-normal);
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--glow-cyan);
}

.team-card__name {
  font-size: var(--fs-heading);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.team-card__members {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* 현재 발표 팀 */
.team-card--active {
  border-color: var(--accent-primary);
  background: linear-gradient(
    180deg,
    rgba(106, 171, 191, 0.15) 0%,
    var(--bg-card) 100%
  );
  box-shadow: var(--glow-cyan);
}

.team-card--active .team-card__name {
  color: var(--accent-primary);
}

/* 발표 완료 팀 */
.team-card--done {
  opacity: 0.5;
}

.team-card--done::after {
  content: '✓';
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  color: var(--color-success);
}

/* =====================================================
 * 발표 진행 현황
 * ===================================================== */

.team-progress {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-xl);
}

.team-progress__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-muted);
  transition: var(--transition-fast);
}

.team-progress__dot--done {
  background: var(--color-success);
  border-color: var(--color-success);
}

.team-progress__dot--current {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: var(--glow-cyan);
  animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* =====================================================
 * 반응형
 * ===================================================== */

@media (max-width: 1280px) {
  .team-name {
    font-size: clamp(56px, 8vw, 100px);
  }

  .team-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .team-name {
    font-size: clamp(40px, 6vw, 72px);
  }

  .team-members {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .team-member:not(:last-child)::after {
    display: none;
  }

  .team-cards {
    grid-template-columns: 1fr;
  }
}
