/* ═══════════════════════════════════════
   Hope 研报 — Editorial Magazine Design
   Playfair Display + Inter · Warm + Ink
   (字体通过 base.html 的 <link> 加载，避免 @import 瀑布阻塞)
   ═══════════════════════════════════════ */

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

/* ── Design Tokens ── */
:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --text: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #78716c;
    --border: #e7e5e4;
    --border-light: #f5f5f4;
    --accent: #0f3d2e;
    --accent-light: #f0fdf6;
    --accent-gradient: linear-gradient(135deg, #0f3d2e, #166534);
    --gold: #b45309;
    --gold-light: #fffbeb;
    --green: #15803d;
    --green-bg: #f0fdf4;
    --amber: #b45309;
    --amber-bg: #fffbeb;
    --red: #b91c1c;
    --red-bg: #fef2f2;
    --purple: #7c3aed;
    --purple-bg: #f5f3ff;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.03);
    --shadow-md: 0 2px 8px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.06);
    --ease: cubic-bezier(.4,0,.2,1);
    --ease-out: cubic-bezier(.16,1,.3,1);
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold); text-decoration: underline; }

h1,h2,h3,h4 { font-family: 'Playfair Display', 'Noto Serif SC', serif; font-weight: 700; letter-spacing: -.3px; }
h1 { font-size: 2.75rem; line-height: 1.15; }
h2 { font-size: 1.75rem; line-height: 1.25; }
h3 { font-size: 1.35rem; line-height: 1.35; font-weight: 600; }

/* ── Header ── */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250,250,249,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1120px; margin: 0 auto; padding: 0 32px;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text);
}
.brand-icon {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 16px; color: #fff; font-weight: 700;
}
.brand-text { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.brand-accent { color: var(--accent); font-weight: 700; }

/* ── Navigation ── */
.nav { display: flex; gap: 2px; }
.nav-link {
    padding: 8px 16px; border-radius: 6px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    transition: all .15s var(--ease); letter-spacing: .1px;
}
.nav-link:hover { background: var(--border-light); color: var(--text); text-decoration: none; }
.nav-upload-link { background: var(--accent); color: #fff; }
.nav-upload-link:hover { background: #166534; color: #fff; }

/* ── Mobile Menu ── */
.menu-toggle { display: none; }
.menu-btn { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 10px; }
.menu-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s ease; }
.menu-toggle:checked ~ .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle:checked ~ .menu-btn span:nth-child(2) { opacity: 0; }
.menu-toggle:checked ~ .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .menu-btn { display: flex; }
    .nav {
        display: flex; flex-direction: column;
        position: absolute; top: 60px; left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        padding: 0 24px; gap: 0; box-shadow: var(--shadow-lg);
        max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height .3s ease, opacity .25s ease, padding .3s ease;
    }
    .menu-toggle:checked ~ .nav {
        max-height: 400px; opacity: 1; padding: 12px 24px;
    }
    .nav-link { padding: 12px 16px; font-size: 15px; }
    .nav-upload-link { text-align: center; margin-top: 4px; }
    .header-inner { padding: 0 20px; }
}

@media (max-width: 480px) {
    .main { padding: 16px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.2rem; }
    .btn { padding: 8px 16px; font-size: 13px; }
}

/* ── Main ── */
.main { max-width: 1120px; margin: 0 auto; padding: 32px; min-height: 60vh; }
body { touch-action: manipulation; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px; border-radius: 6px;
    font-size: 13px; font-weight: 500; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all .2s var(--ease);
    border: 1px solid var(--border);
    background: var(--surface); color: var(--text-secondary);
    text-decoration: none; line-height: 1.4;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #166534; color: #fff; border-color: #166534; }
.btn-sm { padding: 5px 14px; font-size: 12px; }

/* ── Cards ── */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all .25s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }

/* ── Pills / Tags ── */
.pill {
    display: inline-flex; align-items: center; padding: 3px 10px;
    border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap;
    letter-spacing: .1px;
}
.pill-default { background: var(--border-light); color: var(--text-muted); }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-blue { background: var(--accent-light); color: var(--accent); }
.pill-purple { background: var(--purple-bg); color: var(--purple); }

/* ── Spinner ── */
.spinner {
    width: 28px; height: 28px; margin: 0 auto;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--text); color: #fff; padding: 12px 24px;
    border-radius: 8px; font-size: 14px; font-weight: 500;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
    z-index: 1000; opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease);
}
.toast.show { opacity: 1; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: .6; }
.empty-state p { font-size: 15px; }

/* ── Footer ── */
.footer { text-align: center; padding: 40px 32px 48px; color: var(--text-muted); font-size: 13px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .main { padding: 20px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.4rem; }
}
