:root {
  --primary: #4F86F7;
  --primary-hover: #3b6cd6;
  --text-dark: #1F2937;
  --text-light: #4B5563;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(255, 255, 255, 0.5);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #e0e5ec;
}

.background-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05); /* Slight zoom to hide edges during blur/anim */
  filter: blur(2px) brightness(0.9);
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Screens */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Glassmorphism Card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: var(--shadow-glass);
  text-align: center;
}

/* Typography */
.badge {
  display: inline-block;
  background: linear-gradient(135deg, #4F86F7, #2DD4BF);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.main-title {
  font-size: 2rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 10px;
  line-height: 1.3;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.description {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 40px;
}

/* Buttons */
.primary-btn {
  background: linear-gradient(135deg, var(--primary), #3b6cd6);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 14px rgba(79, 134, 247, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 134, 247, 0.5);
}

.primary-btn:active {
  transform: translateY(1px);
}

.secondary-btn {
  background: white;
  color: var(--text-dark);
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

/* Question Screen */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.4s ease;
}

.question-number {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.question-text {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 30px;
  line-height: 1.4;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #D1D5DB;
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.option-btn:hover {
  border-color: var(--primary);
  background: #F0F5FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.option-btn:active, .option-btn.selected {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  transform: translateY(1px);
}

/* Loading */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #E5E7EB;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Result Screen */
.result-card {
  text-align: left;
  padding: 30px;
}

.result-heading {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

.type-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  border: 1px solid #F3F4F6;
}

.type-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #E5E7EB;
}

.type-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
}

.type-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

.type-english {
  font-size: 0.9rem;
  color: #9CA3AF;
  font-weight: 600;
  letter-spacing: 1px;
}

.traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.trait-box {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 16px;
}

.trait-box h4 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trait-box.pros h4 { color: var(--success); }
.trait-box.cons h4 { color: var(--danger); }

.trait-box.pros h4::before { content: '⭕️'; }
.trait-box.cons h4::before { content: '⚠️'; }

.trait-box ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.trait-box ul li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 14px;
}
.trait-box ul li::before {
  content: '・';
  position: absolute;
  left: 0;
  color: #9CA3AF;
}

.info-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.info-block {
  background: #F3F4F6;
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.info-block.warning {
  border-left-color: var(--text-dark);
  background: #F9FAFB;
}

.info-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
}

.info-content {
  font-size: 0.95rem;
  font-weight: 600;
}

.jc-message-box {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.jc-icon {
  font-size: 1.5rem;
}

.jc-message {
  font-weight: 700;
  color: #92400E;
  line-height: 1.5;
}

.final-message-container {
  text-align: center;
  background: rgba(255,255,255,0.5);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 30px;
}

.final-message-container h3 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.highlight-message {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 16px;
}

.sub-message {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Flashy Shukko Animation */
.flashy-shukko {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 900;
  color: #FF0055;
  text-shadow: 0 0 10px #FF0055, 0 0 20px #FF0055, 0 0 30px #FFAA00, 0 0 40px #FFAA00;
  animation: explodePulse 0.8s infinite alternate;
  margin: 0 8px;
  transform-origin: center;
  line-height: 1;
}

@keyframes explodePulse {
  0% { transform: scale(1); text-shadow: 0 0 10px #FF0055, 0 0 20px #FF0055; }
  100% { transform: scale(1.4) rotate(5deg); text-shadow: 0 0 20px #FFAA00, 0 0 40px #FF0055, 0 0 60px #FFAA00, 0 0 80px #FFFF00; color: #FFEB3B; }
}

@media (max-width: 480px) {
  .traits-grid {
    grid-template-columns: 1fr;
  }
  .glass-card {
    padding: 30px 20px;
  }
}

/* Usage Box on Cover */
.usage-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
  margin-bottom: 40px;
  text-align: left;
}

.usage-title {
  font-weight: 700;
  color: #4f46e5;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.usage-main {
  font-size: 0.9rem;
  color: #111827;
  font-weight: 500;
  margin-bottom: 6px;
}

.usage-scene {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.5;
}
