@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Noto+Sans+TC:wght@400;600;700&display=swap');

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #d0d7ff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #2f66ff;
  --accent-soft: rgba(47, 102, 255, 0.16);
  --danger: #ef4444;
  --radius: 18px;
  --font-sans: 'Inter', 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'PingFang TC', 'Noto Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #e0f2ff, #f8fafc 55%);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  width: 100%;
  max-width: 1100px;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.flash.success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
}

.flash.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

h1 {
  margin: 0;
  font-size: 1.95rem;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.card + .card {
  margin-top: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-header .meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.exp-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.exp-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(135deg, #2563eb, #3b82f6, #a855f7);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.3);
}

.btn.secondary {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid #cbd5f5;
}

.btn.ghost {
  background: transparent;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  color: var(--muted);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn:active {
  transform: translateY(1px);
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-size: 0.82rem;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

button,
input,
textarea,
select {
  font: inherit;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(15, 23, 42, 0.55) 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.55) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input[type='file'] {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

input[type='file']::file-selector-button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 600;
  margin-right: 10px;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  border-radius: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 720px) {
  body {
    padding: 24px 12px;
  }
}
