/* 小朱的储物间 · 浅色简约主题 */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3ede5;
  --ink: #24201c;
  --ink-soft: #5d554d;
  --muted: #8d8279;
  --line: #e9e1d7;
  --accent: #dd7440;
  --accent-dark: #c4612f;
  --accent-soft: #fdf1e7;
  --danger: #c2453a;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(60, 40, 20, 0.07);
  --shadow-lg: 0 18px 44px rgba(60, 40, 20, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -8%, #fdeee2 0%, rgba(253, 238, 226, 0) 60%),
    radial-gradient(900px 480px at 100% 0%, #f2ede5 0%, rgba(242, 237, 229, 0) 55%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(221, 116, 64, 0.3);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav > a,
.topnav .linklike {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  transition: background 0.15s ease, color 0.15s ease;
}

.topnav > a:hover,
.topnav .linklike:hover {
  background: var(--surface);
  color: var(--ink);
}

.topnav > a.is-active {
  color: var(--ink);
  font-weight: 600;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(60, 40, 20, 0.06);
}

.inline-form {
  display: inline;
  margin: 0;
}

/* ---------- 首页 ---------- */

.home {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.hero {
  text-align: center;
  padding: 56px 12px 40px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--accent);
  font-weight: 600;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  font-weight: 800;
}

.hero-sub {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
}

.notice-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  background: var(--accent-soft);
  border: 1px solid #f6ddc9;
  border-radius: 14px;
  color: var(--ink-soft);
}

.notice-strip p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.notice-label,
.announce-label {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #f0d3bf;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 22px;
}

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
}

.card-desc {
  color: var(--muted);
  font-size: 0.92rem;
}

.card-go {
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.card-off {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  opacity: 0.62;
}

.card-off:hover {
  transform: none;
  box-shadow: none;
}

/* ---------- 通用页面 ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}

.page-narrow {
  max-width: 760px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.05rem);
  letter-spacing: 0.01em;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 0;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(221, 116, 64, 0.24);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: #dccfc2;
  color: var(--ink);
}

.btn-danger {
  background: #fdf0ef;
  border-color: #f2d2ce;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fbe4e1;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.linklike {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.linklike:hover {
  text-decoration: underline;
}

/* ---------- 上传区 ---------- */

.uploader {
  margin-bottom: 26px;
}

.dropzone {
  padding: 34px 20px;
  text-align: center;
  background: var(--surface);
  border: 2px dashed #e4d6c8;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--accent);
  background: #fffaf5;
}

.dropzone.is-over {
  transform: scale(1.005);
}

.drop-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.drop-title {
  margin: 12px 0 2px;
  font-size: 1.02rem;
  font-weight: 700;
}

.drop-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.drop-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.upload-item {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.upload-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.upload-status {
  flex: none;
  color: var(--muted);
  font-size: 0.82rem;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8894f, var(--accent));
  transition: width 0.15s ease;
}

.upload-item.is-error .upload-status {
  color: var(--danger);
}

.upload-item.is-error .bar > i {
  background: #e2a49d;
}

.upload-item.is-done .upload-status {
  color: #3f8f5e;
}

/* ---------- 文件列表 ---------- */

.search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.95rem;
}

.search input:focus {
  border-color: #e5c3ac;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row:hover {
  background: #fdfbf8;
}

.file-icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 18px;
}

.file-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.96rem;
}

.file-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.file-actions {
  flex: none;
  display: flex;
  gap: 8px;
}

.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  background: transparent;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

/* ---------- 登录 / 设置 ---------- */

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 32px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-title {
  margin: 0;
  font-size: 1.5rem;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-foot {
  margin: 2px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.field input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfa;
  font-size: 1rem;
  font-weight: 400;
}

.field input:focus {
  border-color: #e5b998;
  outline: none;
  box-shadow: 0 0 0 4px rgba(221, 116, 64, 0.12);
}

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdf0ef;
  border: 1px solid #f2d2ce;
  color: var(--danger);
  font-size: 0.88rem;
}

.center {
  text-align: center;
  align-items: center;
}

.big-code {
  margin: 0;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ---------- 留言板 ---------- */

.announce {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--accent-soft);
  border: 1px solid #f6ddc9;
  border-radius: 14px;
}

.announce p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-form,
.notice-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.message-form input,
.message-form textarea,
.notice-edit textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfa;
  font-size: 0.95rem;
  resize: vertical;
}

.message-form input:focus,
.message-form textarea:focus,
.notice-edit textarea:focus {
  border-color: #e5b998;
  outline: none;
  box-shadow: 0 0 0 4px rgba(221, 116, 64, 0.12);
}

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

.form-foot .muted {
  margin: 0;
  font-size: 0.8rem;
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.message {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.message-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.message-time {
  color: var(--muted);
}

.message-head .linklike {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}

.message-head .linklike:hover {
  color: var(--danger);
}

.message-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-soft);
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: auto;
  padding: 26px 24px 30px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.beian {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.beian a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.beian-empty {
  color: #b7ab9f;
}

.beian-sep {
  color: #cfc3b6;
}

.copyright {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- 响应式 ---------- */

@media (max-width: 680px) {
  .topbar {
    padding: 12px 14px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .brand {
    gap: 8px;
    flex: none;
  }

  .brand-text {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 15px;
  }

  .topnav {
    gap: 2px;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .topnav > a,
  .topnav .linklike {
    padding: 6px 7px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .home {
    padding: 8px 16px 40px;
  }

  .hero {
    padding: 34px 6px 28px;
  }

  .module-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 20px;
  }

  .page {
    padding: 14px 16px 48px;
  }

  .file-row {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .file-main {
    flex-basis: calc(100% - 52px);
  }

  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .file-actions .btn {
    padding: 9px 14px;
  }

  .auth-card {
    padding: 26px 22px;
  }

  .dropzone {
    padding: 26px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
