/* ============================
   Layla 姓名判断 for AI Tools
   ダークテーマ・レスポンシブCSS
   ============================ */

/* --- カラー変数 --- */
:root {
  --bg-deep: #1A0A2E;
  --bg-card: #251442;
  --bg-input: #1E0F35;
  --gold: #C9A86C;
  --gold-light: #E0C992;
  --purple: #7B5EA7;
  --purple-light: #9B7EC8;
  --beige: #E8D5B7;
  --moon-white: #F0E8FF;
  --text: #E8D5B7;
  --text-dim: #9A8B7A;
  --text-bright: #F0E8FF;
  --error: #E85A6B;
  --warning-bg: #3D2A0F;
  --warning-border: #C9A86C;
  --success: #6BCF8E;
  --border: #3A2560;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(10, 4, 20, 0.6);
}

/* --- リセット --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Kaisei Decol', serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  background: linear-gradient(180deg, #1A0A2E 0%, #0F0620 50%, #1A0A2E 100%);
  background-attachment: fixed;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--gold-light);
}

/* --- コンテナ --- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 40px 0;
}

/* ============================
   ヘッダー
   ============================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 10, 46, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.logo-main {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.logo-sub {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-weight: 300;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  line-height: 1;
}

.nav {
  display: flex;
  gap: 20px;
}
.nav a {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav a:hover {
  color: var(--gold);
}

/* ============================
   ヒーロー
   ============================ */
.hero {
  text-align: center;
  padding: 60px 20px 30px;
}

.hero-title {
  font-family: 'Kaisei Decol', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.6;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ============================
   フォーム
   ============================ */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.form-title {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.1em;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 700;
}
.required {
  color: var(--gold);
}

/* セレクト・インプット共通 */
.form-select,
.form-input {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-family: 'Kaisei Decol', serif;
  font-size: 1rem;
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 94, 167, 0.3);
}

/* セレクトの矢印 */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23C9A86C'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* 生年月日の横並び */
.form-row-date {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 8px;
}

/* 出生時間の横並び */
.form-row-time {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-row-time .form-select {
  width: 100px;
}
.time-sep {
  color: var(--text-dim);
  font-size: 1.2rem;
}

/* チェックボックス（不明） */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-left: 8px;
  white-space: nowrap;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--purple);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.checkbox-text {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ヒントテキスト */
.form-hint {
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: 8px;
  line-height: 1.6;
}

/* 性別ラジオボタン */
.form-row-gender {
  display: flex;
  gap: 24px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.radio-label input[type="radio"] {
  accent-color: var(--purple);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.radio-text {
  font-size: 0.95rem;
  color: var(--text);
}

/* 送信ボタン */
.btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), #B8943D);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-deep);
  font-family: 'Kaisei Decol', serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.05em;
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 108, 0.35);
}
.btn-submit:active {
  transform: translateY(0);
}
.btn-icon {
  margin-right: 4px;
}

/* エラー */
.form-error {
  text-align: center;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* ============================
   結果表示
   ============================ */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.result-title {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

/* 警告バナー */
.warning-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--gold-light);
}
.warning-icon {
  margin-right: 4px;
}

/* テキスト出力エリア */
.result-text-wrap {
  background: #0D0620;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
  max-height: 70vh;
  overflow-y: auto;
}
.result-text {
  font-family: 'Kaisei Decol', monospace;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--moon-white);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* スクロールバー */
.result-text-wrap::-webkit-scrollbar {
  width: 6px;
}
.result-text-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.result-text-wrap::-webkit-scrollbar-thumb {
  background: var(--purple);
  border-radius: 3px;
}

/* コピーボタン（メインCTA） */
.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), #B8943D);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-deep);
  font-family: 'Kaisei Decol', serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  margin-bottom: 20px;
}
.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 108, 0.35);
}
.btn-copy:active {
  transform: translateY(0);
}
.btn-copy.copied {
  background: linear-gradient(135deg, var(--success), #4AAE6B);
}

/* ガイドへの誘導 */
.guide-teaser {
  text-align: center;
  padding: 16px;
  background: rgba(123, 94, 167, 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(123, 94, 167, 0.2);
}
.guide-teaser p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.guide-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
}

/* もう一度計算 */
.btn-again {
  display: block;
  margin: 24px auto 0;
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: 'Kaisei Decol', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-again:hover {
  border-color: var(--purple);
  color: var(--text);
}

/* ============================
   フッター
   ============================ */
.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-brand {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.footer-nav a {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-nav a:hover {
  color: var(--gold);
}

/* ============================
   アバウトページ
   ============================ */
.about-section {
  margin-bottom: 36px;
}

.about-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.about-section p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 10px;
}

.feature-list {
  list-style: none;
  padding: 0;
}
.feature-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid rgba(58, 37, 96, 0.5);
  line-height: 1.7;
}
.feature-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.developer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.developer-card h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 2px;
}
.developer-role {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 12px;
}
.developer-card p {
  font-size: 0.85rem;
  line-height: 1.8;
}

.about-link {
  margin-top: 8px;
}
.about-link a {
  font-weight: 700;
}

/* ============================
   レスポンシブ
   ============================ */
.sp-hide {
  display: inline;
}

@media (max-width: 768px) {
  .hero {
    padding: 40px 20px 20px;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .form-card,
  .result-card {
    padding: 24px 18px;
  }
}

@media (max-width: 480px) {
  .sp-hide {
    display: none;
  }
  .hero-title {
    font-size: 1.3rem;
  }
  .hero-lead {
    font-size: 0.82rem;
  }
  .form-row-date {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .form-row-time .form-select {
    width: 90px;
  }
  .result-text {
    font-size: 0.75rem;
  }
  .btn-copy {
    font-size: 0.95rem;
    padding: 14px;
  }
}

/* ============================
   ガイドページ
   ============================ */
.guide-page,
.about-page {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-title {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.page-lead {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.guide-section {
  margin-bottom: 48px;
}

.guide-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.guide-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* ステップカード */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.step-num {
  font-family: 'Grenze', 'Kaisei Decol', serif;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
.step-card h3 {
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.8;
}

/* 原因カード */
.cause-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.cause-card h3 {
  font-size: 0.95rem;
  color: var(--text-bright);
  margin-bottom: 12px;
}
.cause-card p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.8;
  margin-top: 10px;
}

/* コードブロック */
.code-block {
  background: #0D0620;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 8px 0;
}
.code-block code {
  font-family: 'Kaisei Decol', monospace;
  font-size: 0.8rem;
  color: var(--moon-white);
  line-height: 1.8;
}

/* プロンプトカード */
.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.prompt-card h3 {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.prompt-box {
  background: #0D0620;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'Kaisei Decol', monospace;
  font-size: 0.78rem;
  color: var(--moon-white);
  line-height: 1.9;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.btn-prompt-copy {
  display: inline-block;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-family: 'Kaisei Decol', serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-prompt-copy:hover {
  background: var(--gold);
  color: var(--bg-deep);
}
.btn-prompt-copy.copied {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg-deep);
}

/* コツカード */
.tip-card {
  margin-bottom: 20px;
}
.tip-card h3 {
  font-size: 0.95rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}

/* 注意事項リスト */
.notice-list {
  list-style: none;
  padding: 0;
}
.notice-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.8;
}
.notice-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* CTA */
.guide-cta {
  text-align: center;
  padding: 20px 0;
}
.guide-cta .btn-submit {
  display: inline-block;
  width: auto;
  padding: 14px 40px;
  text-decoration: none;
}
