/* style.css
 *
 * 網站整體視覺風格：簡約、有質感、不花俏。
 *
 * 設計原則：
 * - 保留溫暖的留白與呼吸感
 * - 以「柔和陰影 + 細邊框 + 圓角」建立卡片層次
 * - 不用太多顏色，但用一致的中性色與一個低飽和強調色
 */

:root {
  --bg-1: #f6f3ee;
  --bg-2: #f7f9fb;
  --text: #1f2328;
  --muted: #667085;
  --surface: rgba(255, 255, 255, 0.88);
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --accent: #2f6f55; /* 低飽和綠，沉穩溫柔 */
  --accent-2: #caa35a; /* 柔金，用於少量點綴 */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "PingFang TC", "PingFang SC", "Noto Sans TC", "Noto Sans SC", sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(1200px 420px at 18% 0%, rgba(250, 238, 220, 0.65), transparent 60%),
    radial-gradient(900px 420px at 82% 10%, rgba(226, 241, 255, 0.70), transparent 62%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 45%, #f3f4f6 100%);
}

/* ====== Header ====== */

header {
  position: relative;
  background-image: url('/images/header_background.png');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 18px 18px 22px;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.30), rgba(0,0,0,0.15));
}

.header-inner {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.header-inner h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

nav a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.language-switch {
  font-size: 14px;
  color: rgba(255,255,255,0.92);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.language-switch a {
  color: rgba(255,255,255,0.96);
  text-decoration: none;
  margin: 0 2px;
}

.language-switch a:hover {
  text-decoration: underline;
}

/* ====== Layout ====== */

main {
  max-width: 1040px;
  margin: 18px auto 28px;
  padding: 0 18px;
}

main h2 {
  margin: 10px 0 16px;
  font-size: 22px;
  letter-spacing: 0.2px;
}

/* ====== Cards ====== */

.card-item,
.report-item,
.member-profile,
.admin form {
  background: var(--surface);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.card-item img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.card-title {
  margin: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.content-text {
  margin-top: 10px;
  white-space: normal;
  line-height: 1.75;
}

.snippet-title {
  margin-top: 10px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(47, 111, 85, 0.25);
  color: var(--accent);
  background: rgba(47, 111, 85, 0.08);
}

.actions {
  margin-top: 12px;
}

a.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
}

a.link:hover {
  text-decoration: underline;
}

/* ====== Home grid ====== */

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 860px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== Form styling ====== */

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(47, 111, 85, 0.45);
  box-shadow: 0 0 0 4px rgba(47, 111, 85, 0.10);
}

button {
  appearance: none;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(47, 111, 85, 0.20);
  background: linear-gradient(180deg, rgba(47, 111, 85, 0.95), rgba(47, 111, 85, 0.85));
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

button:hover {
  filter: brightness(0.97);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ====== Footer ====== */

footer {
  background: rgba(17, 24, 39, 0.88);
  color: rgba(255,255,255,0.94);
  text-align: center;
  padding: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ====== Utility ====== */

.success {
  color: #11734b;
}

.error {
  color: #b42318;
}

/* ====== Token Login Modal ====== */

.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: 92%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.modal-content h2 {
  margin: 0 0 6px;
}

.modal-content p {
  margin: 0 0 10px;
  color: var(--muted);
}

.modal-content input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.modal-content button {
  width: 100%;
  margin-top: 0;
}
