:root {
  --primary-color: #0f172a;
  --accent-color-a: #3b82f6; /* Blue for Class A */
  --accent-color-b: #ec4899; /* Pink/Rose for Class B */
  --accent-color-c: #63d697; /* Green for Leadership (from image) */
  --accent-color-d: #e89e61; /* Orange for Business Game (from image) */
  --text-color: #334155;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --font-heading: "Outfit", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
  
  /* New Hero Variables */
  --hero-bg-top: #0f172a;
  --hero-bg-bottom: #1e1b4b;
  --hero-text: #f8fafc;
  --hero-accent: #38bdf8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
.stat-number,
.subtitle {
  font-family: var(--font-heading);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0; /* Hidden initially, JS will reveal */
  transform: translateY(20px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  background: radial-gradient(circle at center, var(--hero-bg-bottom), var(--hero-bg-top));
  overflow: hidden;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  color: var(--hero-text);
}

/* 背景の装飾（パーティクル） */
.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    animation: twinkle 5s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.5); }
}

/* メインコンテナ */
#voice-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    overflow: hidden;
}

/* 浮遊するテキストスタイル */
.voice-bubble {
    position: absolute;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    mix-blend-mode: screen;
    will-change: transform, opacity;
    font-size: 1rem; /* Default, overridden by JS */
}

.voice-bubble:hover {
    z-index: 1000 !important;
    opacity: 1 !important;
    filter: blur(0) !important;
    color: var(--hero-accent);
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    animation-play-state: paused; /* ホバー時に動きを止める */
}

/* カテゴリラベル（ホバー時に表示） */
.voice-bubble::after {
    content: attr(data-source);
    position: absolute;
    top: -1.2em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6em;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    color: #ccc;
}

.voice-bubble:hover::after {
    opacity: 1;
}

/* タイトルオーバーレイ */
.overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 2000;
    pointer-events: none;
    text-align: left;
}

.overlay a {
    pointer-events: auto;
}

.overlay h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    border-left: 1px solid rgba(255,255,255,0.5);
    padding-left: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: white; /* Ensure text is white */
    margin: 0;
}

.overlay p.subtitle {
    font-size: 0.9rem;
    margin-top: 10px;
    padding-left: 20px;
    opacity: 0.7;
    color: #d9dce1;
    text-transform: none; /* Reset if previously uppercase */
}

/* ローディング画面 */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-bg-top);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}
.loader-text {
    letter-spacing: 0.5em;
    animation: pulse 2s infinite;
    color: white;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Intro */
.intro {
  padding: 80px 0;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.intro h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  color: var(--primary-color);
}

.intro p {
  font-size: 1.1rem;
  color: #64748b;
}

/* Report Sections */
.report-section {
  margin-bottom: 120px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.semester-badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-color-a);
  font-weight: 700;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.semester-badge-b {
  background-color: rgba(236, 72, 153, 0.1);
  color: var(--accent-color-b);
}

.semester-badge-c {
  background-color: rgba(99, 214, 151, 0.1);
  color: var(--accent-color-c);
}

.semester-badge-d {
  background-color: rgba(232, 158, 97, 0.1);
  color: var(--accent-color-d);
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--primary-color);
}

.section-theme {
  font-size: 1.2rem;
  color: #64748b;
}

/* Report Card & Animation */
.report-card {
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.report-card.reverse .card-image {
  grid-column: 2;
  grid-row: 1;
}

.report-card.reverse .card-content {
  grid-column: 1;
  grid-row: 1;
}

.card-image {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.report-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Stats */
.stats-grid {
  display: flex;
  justify-content: space-around;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #f1f5f9;
}

.stat-item {
  text-align: center;
}

.progress-circle {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  /* This gradient will be set by JS or inline style normally, but we use a default here and update with JS */
  background: conic-gradient(var(--accent-color-a) 0%, #e2e8f0 0%);
}

#class-b .progress-circle {
  background: conic-gradient(var(--accent-color-b) 0%, #e2e8f0 0%);
}

#leadership .progress-circle {
  background: conic-gradient(var(--accent-color-c) 0%, #e2e8f0 0%);
}

#business-game .progress-circle {
  background: conic-gradient(var(--accent-color-d) 0%, #e2e8f0 0%);
}

.progress-circle::before {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  background: white;
  border-radius: 50%;
}

.stat-number {
  position: relative;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-number small {
  font-size: 1rem;
  color: #94a3b8;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #64748b;
}

/* Base styling for circular progress logic via CSS variables would be ideal, 
   but for this complexity, we can use JS to set the chart angles. */

/* Summary */
.summary-text h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--primary-color);
}

.summary-text ul {
  list-style: none;
}

.summary-text li {
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
  color: #475569;
}

.summary-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-color-a);
}

#class-b .summary-text li::before {
  background-color: var(--accent-color-b);
}

#leadership .summary-text li::before {
  background-color: var(--accent-color-c);
}

#business-game .summary-text li::before {
  background-color: var(--accent-color-d);
}

.summary-text strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* Action Area */
.action-area {
  margin-top: 40px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn:hover {
  background-color: #1e293b;
  transform: translateY(-2px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 80px;
}

/* Responsive */
@media (max-width: 900px) {
  .report-card,
  .report-card.reverse {
    grid-template-columns: 1fr;
  }

  .report-card.reverse .card-image {
    grid-column: 1;
    grid-row: 1;
  }

  .report-card.reverse .card-content {
    grid-column: 1;
    grid-row: 2;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .stats-grid {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
}
