/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", "Hiragino Sans", "Meiryo", sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Landing Page ────────────────────────────────── */
.landing-hero {
  text-align: center;
  padding: 80px 20px 40px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
}
.landing-hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.landing-hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

.landing-actions {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 32px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-block; padding: 12px 32px;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 1rem; font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }

.btn-secondary { background: #fff; color: #2563eb; border: 2px solid #2563eb; }
.btn-secondary:hover { background: #eff6ff; text-decoration: none; }

.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); text-decoration: none; }

.btn-sm { padding: 8px 20px; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Plans Section ───────────────────────────────── */
.plans-section {
  max-width: 960px; margin: 48px auto; padding: 0 20px;
  text-align: center;
}
.plans-section h2 { font-size: 1.8rem; margin-bottom: 32px; color: #1e3a5f; }

.plans-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) { .plans-grid { grid-template-columns: 1fr; } }

.plan-card {
  background: #fff; border-radius: 12px; padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.plan-card:hover { border-color: #2563eb; }
.plan-card.featured { border-color: #2563eb; position: relative; }
.plan-card.featured::before {
  content: "おすすめ"; position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  background: #2563eb; color: #fff; padding: 2px 16px;
  border-radius: 12px; font-size: 0.8rem;
}

.plan-card h3 { font-size: 1.4rem; color: #1e3a5f; margin-bottom: 8px; }
.plan-price { font-size: 2rem; font-weight: 700; color: #2563eb; margin: 16px 0; }
.plan-price span { font-size: 0.9rem; font-weight: 400; color: #666; }

.plan-features { list-style: none; text-align: left; margin: 20px 0; }
.plan-features li { padding: 6px 0; padding-left: 24px; position: relative; }
.plan-features li::before { content: "\2713"; position: absolute; left: 0; color: #22c55e; font-weight: 700; }

/* ── Auth Forms ──────────────────────────────────── */
.auth-container {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #fff; border-radius: 12px; padding: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  width: 100%; max-width: 480px;
}
.auth-card.wide { max-width: 640px; }

.auth-card h2 {
  font-size: 1.6rem; color: #1e3a5f;
  margin-bottom: 8px; text-align: center;
}
.auth-card .subtitle {
  text-align: center; color: #666; margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 4px;
  font-size: 0.9rem; color: #555;
}
.form-group input, .form-group select {
  width: 100%; padding: 10px 12px;
  border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 1rem; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: #999;
}
.form-divider::before, .form-divider::after {
  content: ""; flex: 1; height: 1px; background: #e5e7eb;
}

.form-footer {
  text-align: center; margin-top: 20px;
  font-size: 0.9rem; color: #666;
}

/* ── Google Button ───────────────────────────────── */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 10px; border: 1px solid #d1d5db;
  border-radius: 6px; background: #fff; cursor: pointer;
  font-size: 1rem; color: #333; transition: background 0.2s;
}
.btn-google:hover { background: #f9fafb; }
.btn-google svg { width: 20px; height: 20px; }

/* ── Alert ───────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.hidden { display: none; }

/* ── Password Toggle ────────────────────────────── */
.password-wrapper {
  position: relative;
}
.password-wrapper input {
  padding-right: 42px;
}
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #999; line-height: 1; font-size: 0;
}
.password-toggle:hover { color: #555; }
.password-toggle svg { width: 20px; height: 20px; }

/* ── Password Strength Meter ────────────────────── */
.password-strength {
  margin-top: 6px;
}
.strength-bar {
  height: 4px; border-radius: 2px; background: #e5e7eb;
  overflow: hidden;
}
.strength-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0;
}
.strength-bar-fill[data-level="0"] { width: 0; }
.strength-bar-fill[data-level="1"] { width: 25%; background: #ef4444; }
.strength-bar-fill[data-level="2"] { width: 50%; background: #f59e0b; }
.strength-bar-fill[data-level="3"] { width: 75%; background: #22c55e; }
.strength-bar-fill[data-level="4"] { width: 100%; background: #059669; }
.strength-label {
  font-size: 0.78rem; margin-top: 2px; color: #999;
}

/* ── Nav ─────────────────────────────────────────── */
.top-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.top-nav .logo { font-size: 1.2rem; font-weight: 700; color: #1e3a5f; }
.top-nav .nav-links { display: flex; gap: 16px; align-items: center; }

/* ── Status Badge ────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 10px;
  border-radius: 12px; font-size: 0.8rem; font-weight: 600;
}
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-active { background: #d1fae5; color: #059669; }
.badge-free { background: #e0e7ff; color: #4338ca; }
