/* ============================================================
   2026 Japan Trip — style.css
   ============================================================ */

:root {
  --bg: #0d0f1a;
  --surface: #141726;
  --surface2: #1c2035;
  --border: rgba(255,255,255,0.08);
  --text: #e8eaf6;
  --text-muted: #8892b0;
  --accent: #ff6b9d;
  --accent2: #c084fc;
  --accent3: #38bdf8;
  --gold: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --fuji: linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  --sakura: linear-gradient(135deg,#f093fb 0%,#f5576c 100%);
  --ocean: linear-gradient(135deg,#4facfe 0%,#00f2fe 100%);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans TC', 'Outfit', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent3); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); text-decoration: underline; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(192,132,252,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,107,157,0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 80%, rgba(56,189,248,0.15) 0%, transparent 50%),
    linear-gradient(180deg, #0d0f1a 0%, #0f1225 100%);
  z-index: 0;
}

.sakura-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -30px;
  font-size: 1.2rem;
  opacity: 0.7;
  animation: fall linear infinite;
  user-select: none;
}

@keyframes fall {
  0% { transform: translateY(-30px) rotate(0deg) translateX(0); opacity: 0.8; }
  100% { transform: translateY(110vh) rotate(720deg) translateX(60px); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.flag {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  background: linear-gradient(135deg, #f093fb, #f5576c, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.15em;
}

.date-badge {
  display: inline-block;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 2.5rem; font-weight: 700; background: var(--fuji); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-div { width: 1px; height: 40px; background: var(--border); }

/* ── NAV TABS ── */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
  backdrop-filter: blur(12px);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 1.4rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.tab-btn.active {
  background: linear-gradient(135deg, #f093fb, #c084fc);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(192,132,252,0.4);
}

/* ── MAIN ── */
.main { max-width: 900px; margin: 0 auto; padding: 2rem 1rem 4rem; }

.tab-section { display: none; animation: fadeIn 0.4s ease; }
.tab-section.active { display: block; }

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

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── DAY CARD ── */
.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.day-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.highlight-card { border-color: rgba(192,132,252,0.3); }

.fuji-card {
  background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%), var(--surface);
  border-color: rgba(102,126,234,0.3);
}

.day-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.day-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.day-badge.special {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.day-info { flex: 1; }
.day-date { font-size: 0.82rem; color: var(--text-muted); }
.day-title { font-size: 1.05rem; font-weight: 600; }

.day-hotel { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.day-hotel a { color: var(--text-muted); }
.day-hotel a:hover { color: var(--accent3); }

.day-body { padding: 1.25rem 1.5rem; }

/* ── EVENTS ── */
.events { display: flex; flex-direction: column; gap: 0; }

.event {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  position: relative;
}

.event:last-child { border-bottom: none; }

.event.optional { opacity: 0.65; }

.time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent3);
  white-space: nowrap;
  min-width: 72px;
  padding-top: 2px;
  font-family: 'Outfit', sans-serif;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  margin-top: 6px;
}

.dot.flight { background: var(--gold); box-shadow: 0 0 8px rgba(251,191,36,0.5); }
.dot.arrive { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,0.5); }
.dot.train { background: var(--accent3); box-shadow: 0 0 8px rgba(56,189,248,0.4); }
.dot.food { background: var(--accent); box-shadow: 0 0 8px rgba(255,107,157,0.4); }
.dot.activity { background: var(--accent2); box-shadow: 0 0 8px rgba(192,132,252,0.4); }
.dot.shop { background: #fb923c; box-shadow: 0 0 8px rgba(251,146,60,0.4); }
.dot.onsen { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,0.4); }

.desc { font-size: 0.9rem; flex: 1; }
.desc small { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

.warn { color: #fb923c; font-size: 0.82rem; font-weight: 500; }

.tag-opt {
  display: inline-block;
  background: rgba(251,146,60,0.15);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.3);
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 1px 6px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── TIPS BOX ── */
.tips-box {
  margin-top: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
}

.tips-title { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }

.tips-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tips-links a, .tips-links span {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text);
  transition: var(--transition);
}

.tips-links a:hover { background: rgba(192,132,252,0.15); border-color: var(--accent2); color: var(--accent2); text-decoration: none; }

/* ── TODO INLINE ── */
.todo-inline {
  margin-top: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
}

.todo-title { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }

.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.2rem 0;
  font-size: 0.88rem;
  transition: var(--transition);
}

.check-item:hover span { color: var(--text); }

.check-item input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent2);
  cursor: pointer;
  flex-shrink: 0;
}

.check-item.done span { text-decoration: line-through; color: var(--text-muted); }

/* ── PLAN TABS ── */
.plan-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.plan-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.plan-tab.active {
  background: rgba(192,132,252,0.15);
  border-color: var(--accent2);
  color: var(--accent2);
  font-weight: 600;
}

.plan-content { display: none; }
.plan-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ── INFO CARD ── */
.info-card {
  display: flex;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(251,191,36,0.07), rgba(251,191,36,0.03));
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  align-items: flex-start;
}

.info-icon { font-size: 2.5rem; flex-shrink: 0; }
.info-content { flex: 1; }
.info-title { font-size: 1.05rem; font-weight: 700; color: var(--gold); margin-bottom: 0.8rem; }

.info-rows { display: flex; flex-direction: column; gap: 0.4rem; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-val { font-weight: 500; }
.info-val.accent { color: var(--red); font-weight: 700; }

/* ============================================================
   EXPENSE TAB
   ============================================================ */
.expense-wrapper { display: flex; flex-direction: column; gap: 2rem; }

.expense-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.summary-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.accent-card {
  background: linear-gradient(135deg, rgba(240,147,251,0.12), rgba(245,87,108,0.08));
  border-color: rgba(240,147,251,0.3);
}

.summary-icon { font-size: 1.8rem; margin-bottom: 0.3rem; }
.summary-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.summary-val { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.summary-val.big { font-size: 1.6rem; background: var(--sakura); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.section-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text); }
.rate-note { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.8rem; }

/* ── EXPENSE TABLE ── */
.expense-table-wrap { overflow-x: auto; }

.expense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.expense-table th {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.expense-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.expense-table tr:hover td { background: rgba(255,255,255,0.02); }

.expense-table .subtotal td { background: rgba(255,255,255,0.04); font-size: 0.85rem; }
.expense-table .total-row td { background: rgba(240,147,251,0.07); font-size: 0.95rem; }

/* Payer badges */
.payer {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.p1 { background: rgba(248,113,113,0.15); color: #fca5a5; border: 1px solid rgba(248,113,113,0.3); }
.p2 { background: rgba(56,189,248,0.15); color: #7dd3fc; border: 1px solid rgba(56,189,248,0.3); }
.p3 { background: rgba(251,191,36,0.15); color: #fde68a; border: 1px solid rgba(251,191,36,0.3); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.paid { background: rgba(52,211,153,0.15); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.3); }
.badge.partial { background: rgba(192,132,252,0.15); color: #d8b4fe; border: 1px solid rgba(192,132,252,0.3); }

/* ── SPLIT ── */
.split-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }

.split-subtitle { font-size: 0.95rem; font-weight: 600; color: var(--accent2); margin-bottom: 0.3rem; }
.split-note { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 0.8rem; }

.split-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.split-table th { color: var(--text-muted); font-weight: 600; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; }
.split-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.split-table tr:last-child td { border-bottom: none; }

.owe { color: var(--red); font-weight: 600; }
.over { color: var(--green); font-weight: 600; }

/* ── SETTLEMENT ── */
.settlement-box {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, rgba(240,147,251,0.08), rgba(245,87,108,0.05));
  border: 1px solid rgba(240,147,251,0.25);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
}

.settlement-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.settlement-rows { display: flex; flex-direction: column; gap: 0.7rem; }

.settlement-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
}

.from, .to { min-width: 80px; }
.arrow { color: var(--text-muted); font-size: 1.2rem; }
.amount { margin-left: auto; font-size: 1.1rem; font-weight: 700; color: var(--gold); }

/* ============================================================
   TODO TAB
   ============================================================ */
.todo-wrapper { display: flex; flex-direction: column; gap: 1.5rem; }

.todo-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.todo-group-header {
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.todo-group-header.red { background: rgba(248,113,113,0.08); color: #fca5a5; }
.todo-group-header.yellow { background: rgba(251,191,36,0.08); color: #fde68a; }
.todo-group-header.green { background: rgba(52,211,153,0.08); color: #6ee7b7; }

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
}

.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: rgba(255,255,255,0.025); }

.todo-item.sub { padding-left: 2.5rem; background: rgba(255,255,255,0.01); }
.todo-item.sub span { color: var(--text-muted); }

.todo-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent2);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.todo-item input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.sub-group-title {
  padding: 0.6rem 1.25rem 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 0.2rem;
}

/* ── APP GRID ── */
.app-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem 1rem;
}

.app-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.25rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text);
  transition: var(--transition);
}

.app-item a { color: var(--text); }
.app-item:hover { background: rgba(56,189,248,0.1); border-color: var(--accent3); }

/* ── FOOTER ── */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.footer-sub { margin-top: 0.3rem; font-size: 0.78rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .tab-btn { font-size: 0.85rem; padding: 0.45rem 0.9rem; }
  .day-header { padding: 0.8rem 1rem; }
  .day-body { padding: 1rem; }
  .time { min-width: 58px; font-size: 0.72rem; }
  .desc { font-size: 0.85rem; }
  .expense-summary { grid-template-columns: repeat(2, 1fr); }
  .settlement-row { flex-wrap: wrap; }
  .info-card { flex-direction: column; }
  .plan-tabs { flex-direction: column; }
}
