/* =================================================================
   Empath Referral LIFF Styles
   ブランドカラー：黒 #1A1A1A / ネオングリーン #06C755
   ================================================================= */

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

:root {
  --primary: #06C755;
  --primary-dark: #04a844;
  --text-main: #1A1A1A;
  --text-sub: #444444;
  --text-mute: #9CA3AF;
  --bg: #F5F7FA;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  --error: #DC2626;
  --warning: #F59E0B;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: 16px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 24px;
  margin-bottom: 4px;
}
.hero .lead {
  font-size: 13px;
  opacity: 0.95;
}

/* ========== Card ========== */
.card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.card h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-main);
}
.card h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text-main);
}

/* ========== Loading ========== */
.loading {
  text-align: center;
  padding: 40px 20px;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading p {
  color: var(--text-sub);
  font-size: 13px;
}

/* ========== Error ========== */
.error {
  text-align: center;
  padding: 24px;
}
.error h2 {
  color: var(--error);
}
.error p {
  color: var(--text-sub);
  margin-bottom: 16px;
}

/* ========== Link Box ========== */
.link-box {
  margin-bottom: 12px;
}
#link-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: monospace;
  background: #F9FAFB;
  color: var(--text-main);
}

/* ========== Buttons ========== */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: #F3F4F6;
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #E5E7EB; }

.hint {
  margin-top: 10px;
  color: var(--text-mute);
  font-size: 12px;
}

/* ========== Stats ========== */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.stat {
  text-align: center;
  padding: 12px 4px;
  background: #F9FAFB;
  border-radius: 8px;
}
.stat-num {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1.2;
}
.stat-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* ========== Progress ========== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  width: 0;
  transition: width 0.5s ease-out;
}
.next-reward {
  font-size: 12px;
  color: var(--text-sub);
  text-align: center;
}

/* ========== Reward List ========== */
.reward-list {
  list-style: none;
}
.reward-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.reward-item:last-child { border-bottom: none; }
.reward-tier {
  font-weight: 900;
  color: var(--primary-dark);
  font-size: 14px;
  min-width: 40px;
}
.reward-label {
  color: var(--text-main);
  font-size: 13px;
}
.reward-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  background: #F3F4F6;
  color: var(--text-mute);
}
.reward-status.achieved {
  background: var(--primary);
  color: #fff;
}

/* ========== History ========== */
.history-list {
  list-style: none;
}
.history-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.history-list li:last-child { border-bottom: none; }
.history-list .date {
  color: var(--text-mute);
  font-size: 11px;
}

/* ========== Hint Card ========== */
.hint-card {
  background: #FEF3C7;
  border-left: 4px solid var(--warning);
}
.hint-card ul {
  list-style: disc;
  padding-left: 20px;
}
.hint-card li {
  font-size: 12px;
  color: var(--text-sub);
  padding: 4px 0;
}

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 16px;
  color: var(--text-mute);
  font-size: 11px;
  margin-top: 16px;
}
