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

body {
  font-family: 'Noto Serif JP', serif;
  background: #0a0a1a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 500px;
  background: linear-gradient(135deg, #0d0d2b 0%, #1a0533 50%, #0d1a3a 100%);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  margin: 2rem auto;
}

/* 星 */
.stars {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.2; }
  to   { opacity: 0.9; }
}

/* タイトル */
.title {
  text-align: center;
  color: #c9a84c;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0.15em;
  position: relative;
}
.subtitle {
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  margin-bottom: 2rem;
  position: relative;
}

/* フォームカード */
.form-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
}
.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.form-group select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  color: white;
  padding: 8px 6px;
  font-size: 14px;
  font-family: 'Noto Serif JP', serif;
  width: 100%;
  cursor: pointer;
}
.form-group select option {
  background: #1a0533;
  color: white;
}
.form-group select:focus {
  outline: none;
  border-color: #c9a84c;
}

/* 占うボタン */
.btn {
  width: 100%;
  background: linear-gradient(90deg, #c9a84c, #e8c96d);
  border: none;
  border-radius: 10px;
  color: #0d0d2b;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Noto Serif JP', serif;
  padding: 13px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: opacity 0.2s, transform 0.1s;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

/* 結果エリア */
#result-area {
  display: none;
  text-align: center;
  position: relative;
  animation: fadeIn 0.8s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.result-label {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  margin-bottom: 0.4rem;
  letter-spacing: 0.08em;
}
.result-type {
  color: #c9a84c;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: 0.2em;
}
.result-meisuu {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  margin-bottom: 1.5rem;
}

.result-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  text-align: left;
  margin-bottom: 0.8rem;
}
.result-card h3 {
  color: #c9a84c;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.12em;
}
.result-card p {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  line-height: 1.8;
}

/* アフィリエイト */
.affiliate-box {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-top: 0.8rem;
  text-align: center;
}
.affiliate-box p {
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  margin-bottom: 0.5rem;
}
.affiliate-link {
  color: #c9a84c;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.5);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.affiliate-link:hover { color: #e8c96d; }

/* もう一度ボタン */
.back-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-family: 'Noto Serif JP', serif;
  padding: 8px 24px;
  cursor: pointer;
  margin-top: 1.2rem;
  transition: all 0.2s;
}
.back-btn:hover {
  border-color: rgba(255,255,255,0.6);
  color: white;
}

/* スマホ対応 */
@media (max-width: 480px) {
  #app { margin: 1rem; padding: 2rem 1.2rem; }
  .result-type { font-size: 28px; }
}
