@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap');

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

body {
  background-color: #05050f;
  color: #e8e0f0;
  font-family: 'Noto Serif JP', serif;
  min-height: 100vh;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero.hero--result {
  max-height: 52vh;
}

.hero-bg {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .hero {
    height: 100svh;
  }
  .hero-bg {
    content: url('/static/images/hero_sp.png');
    object-position: center center;
  }
  .hero.hero--result {
    height: 56svh;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 2rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 9%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(180,120,255,0.9), rgba(80,40,180,0.7));
  box-shadow:
    0 0 20px rgba(160,80,255,0.8),
    0 0 40px rgba(120,60,220,0.5),
    inset 0 0 20px rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #f0e0ff;
  letter-spacing: 0.1em;
  cursor: pointer;
  animation: float 2.5s ease-in-out infinite;
  border: 1px solid rgba(200,150,255,0.4);
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

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

@media (max-width: 768px) {
  .scroll-hint {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    animation: float-sp 2.5s ease-in-out infinite;
  }
}

@keyframes float-sp {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* ===== CONTAINER ===== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.2rem 3rem;
}

/* ===== INTRO ===== */
.intro-text {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 1rem;
}

.intro-catch {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: #d4a8ff;
  text-shadow: 0 0 12px rgba(180,100,255,0.5);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.intro-text p {
  color: #a090c0;
  font-size: 0.95rem;
  line-height: 2;
}

/* ===== INPUT FIELDS ===== */
.input-section {
  background: rgba(18, 14, 36, 0.9);
  border: 1px solid #2e2a4a;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

.input-section-title {
  color: #c9a8ff;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.2rem;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.input-label {
  display: block;
  color: #9a80cc;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.1em;
}

.text-input {
  width: 100%;
  background: #0d0b1a;
  color: #e8e0f0;
  border: 1px solid #3e3060;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.text-input:focus {
  outline: none;
  border-color: #7a5aaa;
  box-shadow: 0 0 8px rgba(150,80,255,0.2);
}

.birthday-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.birthday-row .select-wrapper {
  flex: 1;
}

.birthday-row span {
  color: #7a6aaa;
  font-size: 0.9rem;
  white-space: nowrap;
}

.select-wrapper select {
  width: 100%;
  background: #0d0b1a;
  color: #e8e0f0;
  border: 1px solid #3e3060;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ===== QUESTIONS ===== */
.question-block {
  background: rgba(18, 14, 36, 0.9);
  border: 1px solid #2e2a4a;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

.question-number {
  color: #5a3d8a;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.4rem;
}

.question-label {
  display: block;
  font-size: 1rem;
  color: #c9a8ff;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  font-size: 0.9rem;
  line-height: 1.6;
}

.option-label:hover {
  background: rgba(90, 60, 140, 0.25);
  border-color: #5a3d8a;
}

.option-label input[type="radio"] {
  margin-top: 3px;
  accent-color: #c9a8ff;
  flex-shrink: 0;
}

.option-label input[type="radio"]:checked + span {
  color: #e0c8ff;
}

/* ===== SUBMIT ===== */
.submit-btn {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.1rem;
  background: linear-gradient(135deg, #6a2d9a, #2d3a8a);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(150, 80, 255, 0.3);
}

.submit-btn:hover {
  opacity: 0.88;
  box-shadow: 0 0 30px rgba(150, 80, 255, 0.5);
}

/* ===== RESULT ===== */
.result-name {
  text-align: center;
  color: #9a80cc;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.result-name span {
  color: #d4a8ff;
}

.result-card {
  background: rgba(14, 10, 30, 0.95);
  border: 1px solid #3a2a5a;
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px rgba(120, 60, 200, 0.15);
}

.result-icon {
  font-size: 4.5rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 12px rgba(200,150,255,0.6));
}

.result-flavor {
  color: #7a6aaa;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.1em;
}

.result-type {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.result-type span {
  color: #d4a8ff;
  text-shadow: 0 0 16px rgba(180,100,255,0.5);
}

.result-subtitle {
  color: #7a6aaa;
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
  letter-spacing: 0.1em;
}

.result-description {
  text-align: left;
  background: rgba(8, 5, 18, 0.8);
  border-left: 3px solid #5a3d8a;
  border-radius: 0 10px 10px 0;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.8rem;
  line-height: 2.1;
  font-size: 0.92rem;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
  margin-bottom: 1.8rem;
  background: rgba(8, 5, 18, 0.5);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
}

.detail-item {
  display: flex;
  gap: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.detail-label {
  color: #c9a8ff;
  white-space: nowrap;
  min-width: 60px;
}

.result-message {
  background: linear-gradient(135deg, rgba(40,18,70,0.8), rgba(18,28,70,0.8));
  border: 1px solid #3e3060;
  border-radius: 10px;
  padding: 1rem 1.4rem;
  font-size: 0.88rem;
  color: #b8a8d8;
  line-height: 2;
  font-style: italic;
}

/* ===== RESULT TAGS ===== */
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.tag {
  border: 1px solid #5a3d8a;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  color: #c9a8ff;
  letter-spacing: 0.05em;
}

/* ===== RESULT SECTIONS ===== */
.result-section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 0.9rem;
  color: #7a6aaa;
  letter-spacing: 0.2em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #2e2a4a;
}

.result-description {
  text-align: left;
  background: rgba(8, 5, 18, 0.8);
  border-left: 3px solid #5a3d8a;
  border-radius: 0 10px 10px 0;
  padding: 1.2rem 1.4rem;
  line-height: 2.1;
  font-size: 0.92rem;
}

.result-description p {
  margin-bottom: 0.8rem;
}

.detail-divider {
  height: 1px;
  background: #2e2a4a;
  margin: 0.4rem 0;
}

/* ===== COMPATIBILITY ===== */
.compatibility-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.compat-item {
  background: rgba(18, 14, 36, 0.9);
  border: 1px solid #3a2a5a;
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  text-align: center;
  flex: 1;
  min-width: 80px;
}

.compat-name {
  color: #c9a8ff;
  font-size: 0.95rem;
}

/* ===== INSIGHT ===== */
.result-insight {
  background: rgba(8, 5, 18, 0.8);
  border-left: 3px solid #5a3d8a;
  border-radius: 0 10px 10px 0;
  padding: 1.2rem 1.4rem;
  line-height: 2.1;
  font-size: 0.92rem;
  color: #c9b8e8;
}

.result-insight--soft {
  border-left-color: #3a5a3a;
  color: #a8c8a8;
}

/* ===== COMPATIBILITY CARDS ===== */
.compat-card {
  background: rgba(14, 10, 30, 0.9);
  border: 1px solid #3a2a5a;
  border-radius: 14px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.compat-header {
  padding: 0.9rem 1.2rem;
  background: rgba(40, 20, 70, 0.6);
  border-bottom: 1px solid #3a2a5a;
}

.compat-name {
  color: #d4a8ff;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}

.compat-body {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.compat-item-detail {
  font-size: 0.88rem;
  line-height: 1.8;
}

.compat-label {
  display: block;
  color: #8a7aaa;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.compat-item-detail p {
  color: #c9b8e8;
  margin: 0;
}

.compat-caution .compat-label {
  color: #8a7a5a;
}

.compat-caution p {
  color: #c8b888;
}

/* ===== LIFE AREAS ===== */
.life-areas-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.life-area-card {
  background: rgba(14, 10, 30, 0.9);
  border: 1px solid #3a2a5a;
  border-radius: 14px;
  overflow: hidden;
}

.life-area-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  background: rgba(40, 20, 70, 0.5);
  border-bottom: 1px solid #3a2a5a;
}

.life-area-icon {
  font-size: 1.2rem;
}

.life-area-title {
  color: #d4a8ff;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}

.life-area-body {
  padding: 1rem 1.2rem;
}

.life-area-desc {
  color: #c9b8e8;
  font-size: 0.88rem;
  line-height: 2;
  margin-bottom: 0.8rem;
}

.life-area-hint {
  background: rgba(30, 20, 60, 0.6);
  border-left: 2px solid #7a5aaa;
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
}

.hint-label {
  display: block;
  color: #7a6aaa;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.life-area-hint p {
  color: #b8a8e8;
  font-size: 0.85rem;
  line-height: 1.8;
  margin: 0;
}

/* ===== CHARACTER MESSAGES ===== */
.char-message-card {
  background: rgba(14, 10, 30, 0.9);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 0.8rem;
  border-left: 4px solid #5a3d8a;
}

.char-vel {
  border-left-color: #8a4d3a;
}

.char-carla {
  border-left-color: #3a4d8a;
}

.char-amamori {
  border-left-color: #3a6a5a;
}

.char-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.char-name {
  color: #d4a8ff;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.char-sub {
  color: #5a4a7a;
  font-size: 0.75rem;
}

.char-msg {
  color: #c9b8e8;
  font-size: 0.88rem;
  line-height: 2;
  font-style: italic;
  margin: 0;
}

/* ===== MIRROR OVERLAY（診断中アニメーション） ===== */
.mirror-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 1, 10, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.mirror-overlay.active {
  display: flex;
  animation: overlayFadeIn 0.4s ease;
}

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

.mirror-content {
  text-align: center;
}

.mirror-frame {
  width: 200px;
  height: 260px;
  border: 3px solid #5a3d8a;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  margin: 0 auto 1.5rem;
  padding: 10px;
  box-shadow:
    0 0 30px rgba(150, 80, 255, 0.5),
    0 0 60px rgba(150, 80, 255, 0.2),
    inset 0 0 20px rgba(150, 80, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.mirror-glass {
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 30% 30%, rgba(120, 80, 200, 0.3), rgba(5, 5, 20, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.mirror-fog {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(180, 120, 255, 0.4), transparent);
  animation: fogPulse 2s ease-in-out infinite;
}

@keyframes fogPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.mirror-text {
  position: relative;
  z-index: 1;
}

.mirror-loading-text {
  color: #e0c8ff;
  font-size: 1.1rem;
  line-height: 1.8;
  letter-spacing: 0.1em;
  animation: textFlicker 3s ease-in-out infinite;
}

@keyframes textFlicker {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; text-shadow: 0 0 20px rgba(200, 150, 255, 0.8); }
}

.mirror-sub {
  color: #7a6aaa;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  line-height: 1.8;
  animation: subFade 2s ease-in-out infinite;
}

@keyframes subFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ===== SHARE ===== */
.share-section {
  margin-bottom: 1.2rem;
  text-align: center;
}

.share-label {
  color: #7a6aaa;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
}

.share-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
}

.share-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.share-x {
  background: #000;
  color: #fff;
  border: 1px solid #333;
}

.share-copy {
  background: rgba(40, 20, 70, 0.8);
  color: #c9a8ff;
  border: 1px solid #5a3d8a;
}

.share-download {
  background: rgba(20, 40, 60, 0.8);
  color: #a8c8ff;
  border: 1px solid #3a5a8a;
}

/* ===== BACK BUTTON ===== */
.back-btn {
  display: block;
  text-align: center;
  padding: 0.9rem;
  border: 1px solid #3e3060;
  border-radius: 12px;
  color: #8a7aaa;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
  margin-top: 1rem;
}

.back-btn:hover {
  background: rgba(90, 60, 140, 0.2);
  color: #c9a8ff;
}
