:root {
  --primary-color: #6a4c93;
  --secondary-color: #7b68ee;
  --accent-color: #9c89b8;
  --light-color: #f0e6ff;
  --dark-color: #2d2b55;
  --text-color: #333;
  --light-text: #fff;
  --background-color: #f8f9fa;
  --card-background: #fff;
  
  --ether-color: #9d65c9;
  --flame-color: #ff5353;
  --flow-color: #1e90ff;
  --crystal-color: #14b8a6;
  --seed-color: #42a832;
  --terra-color: #ffa726;
  
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(106, 76, 147, 0.03) 0%, rgba(106, 76, 147, 0.03) 90%),
    radial-gradient(circle at 90% 80%, rgba(106, 76, 147, 0.03) 0%, rgba(106, 76, 147, 0.03) 90%);
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--light-text);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

.tab-container {
  margin-bottom: 30px;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 50px;
  background-color: var(--light-color);
  padding: 5px;
  box-shadow: var(--shadow);
}

.tab {
  padding: 12px 30px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  text-align: center;
  flex: 1;
  color: var(--primary-color);
}

.tab.active {
  background-color: var(--primary-color);
  color: var(--light-text);
  box-shadow: 0 4px 10px rgba(106, 76, 147, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.card {
  background-color: var(--card-background);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.card h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--light-color);
  padding-bottom: 10px;
  font-size: 1.8rem;
}

.card h3 {
  font-size: 1.4rem;
  margin: 25px 0 15px;
  color: var(--secondary-color);
}

/* 入力フォーム */
.input-form {
  max-width: 700px;
  margin: 0 auto 40px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid var(--light-color);
  border-radius: 8px;
  background-color: white;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 76, 147, 0.2);
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.radio-group {
  display: flex;
  gap: 20px;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-option input {
  margin-right: 8px;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  box-shadow: 0 4px 12px rgba(106, 76, 147, 0.25);
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(106, 76, 147, 0.3);
}

.btn-section {
  text-align: center;
  margin: 20px 0 40px;
}

/* 結果表示セクション */
#results-section {
  display: none;
}

.result-container {
  background-color: white;
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.result-header {
  text-align: center;
  margin-bottom: 30px;
}

.result-header h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 10px;
}

.result-header p {
  color: var(--text-color);
  opacity: 0.8;
}

.result-profile {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.profile-chart {
  flex: 0 0 250px;
  height: 250px;
  background-color: var(--light-color);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.profile-info {
  flex: 1;
}

.profile-info h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.6rem;
}

.element-bar {
  height: 25px;
  margin-bottom: 15px;
  background-color: var(--light-color);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.element-fill {
  height: 100%;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.element-fill.ether {
  background-color: var(--ether-color);
}

.element-fill.flame {
  background-color: var(--flame-color);
}

.element-fill.flow {
  background-color: var(--flow-color);
}

.element-fill.crystal {
  background-color: var(--crystal-color);
}

.element-fill.seed {
  background-color: var(--seed-color);
}

.element-fill.terra {
  background-color: var(--terra-color);
}

.personality-type {
  margin: 25px 0;
  padding: 15px;
  background-color: var(--light-color);
  border-radius: 10px;
  border-left: 5px solid var(--primary-color);
}

.personality-type h4 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.cycle-status {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.cycle-item {
  flex: 1;
  min-width: 260px;
  background-color: var(--light-color);
  border-radius: 10px;
  padding: 15px;
  position: relative;
}

.cycle-name {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.cycle-phase {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.progress-container {
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
}

.cycle-keywords {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.keyword {
  font-size: 0.8rem;
  padding: 4px 10px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
}

.advice-section {
  margin: 40px 0;
}

.advice-card {
  background-color: var(--light-color);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  border-left: 5px solid var(--primary-color);
}

.advice-card h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.advice-card p {
  line-height: 1.7;
}

.category-tabs {
  display: flex;
  border-bottom: 2px solid var(--light-color);
  margin-bottom: 20px;
}

.category-tab {
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.6;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.category-tab.active {
  opacity: 1;
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.category-content {
  display: none;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-content.active {
  display: block;
}

.timeline-section {
  margin: 40px 0;
}

.timeline {
  position: relative;
  padding: 30px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: var(--light-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  display: flex;
}

.timeline-item:nth-child(odd) {
  justify-content: flex-start;
}

.timeline-item:nth-child(even) {
  justify-content: flex-end;
}

.timeline-content {
  width: calc(50% - 40px);
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  position: relative;
}

.timeline-content::after {
  content: '';
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background-color: white;
  transform: rotate(45deg);
}

.timeline-item:nth-child(odd) .timeline-content::after {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-content::after {
  left: -10px;
}

.timeline-year {
  position: absolute;
  top: 20px;
  width: 80px;
  height: 30px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-weight: 600;
}

.timeline-item:nth-child(odd) .timeline-year {
  right: -100px;
}

.timeline-item:nth-child(even) .timeline-year {
  left: -100px;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -50px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -50px;
}

.timeline-content h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.timeline-content p {
  margin-bottom: 10px;
}

.harmony-level {
  display: inline-block;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  color: white;
  margin-top: 5px;
}

.harmony-high {
  background-color: #4caf50;
}

.harmony-medium {
  background-color: #ff9800;
}

.harmony-low {
  background-color: #f44336;
}

/* フッター */
footer {
  text-align: center;
  margin-top: 80px;
  padding: 30px 0;
  background-color: var(--dark-color);
  color: var(--light-text);
  border-radius: 10px;
}

footer p {
  opacity: 0.8;
  margin-bottom: 15px;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
  .profile-chart {
    flex: 0 0 200px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .result-profile {
    flex-direction: column;
    align-items: center;
  }
  
  .timeline::before {
    left: 40px;
  }
  
  .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    justify-content: flex-start;
  }
  
  .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -10px;
  }
  
  .timeline-item:nth-child(odd) .timeline-year,
  .timeline-item:nth-child(even) .timeline-year {
    left: -45px;
    width: 60px;
    font-size: 0.8rem;
  }
  
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 30px;
  }
}

@media (max-width: 576px) {
  .tabs {
    flex-direction: column;
    border-radius: 15px;
  }
  
  .tab {
    border-radius: 10px;
    margin: 5px 0;
  }
  
  .form-row {
    flex-direction: column;
  }
}