:root {
    --primary: #e50914;
    --primary-dim: #b80610;
    --bg: #f4f5f7;
    --bg-card: #ffffff;
    --text: #2a2a2a;
    --text-muted: #888;
    --border: #eee;
    --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --radius: 12px;
}
* { margin:0; padding:0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }

/* Navbar */
.navbar { background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--border); padding: 0.7rem 0; display: flex; justify-content: space-between; align-items: center; position: fixed; width: 100%; top: 0; z-index: 1000; backdrop-filter: blur(10px); }
.navbar .logo { font-size: 1.35rem; font-weight: 700; color: var(--primary); text-decoration: none; letter-spacing: -0.5px; }
.navbar .nav-links { display: flex; gap: 1.5rem; }
.navbar .nav-links a { color: #444; text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.navbar .nav-links a:hover { color: var(--primary); }
.navbar .auth-links a { color: #777; text-decoration: none; margin-left: 1rem; font-size: 0.85rem; }
.navbar .auth-links a:hover { color: var(--primary); }

.wide-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container { max-width: 800px; margin: 86px auto 3rem; padding: 0 1rem; }

/* Breadcrumb */
.breadcrumb { font-size: 0.8rem; color: #999; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.breadcrumb a { color: #999; text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #ccc; margin: 0 0.2rem; }

/* Card base */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.08); }

/* Cover image */
.cover-wrap { text-align: center; margin-bottom: 1.5rem; }
.cover-image { max-width: 260px; height: auto; border-radius: 10px; box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.cover-image:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

/* Post header */
.post-header { margin-bottom: 1.5rem; }
.post-header .top-bar { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.post-header .cat-tag { display: inline-block; padding: 0.25rem 0.7rem; background: var(--primary); color: #fff; font-size: 0.75rem; border-radius: 20px; text-decoration: none; transition: background 0.2s; }
.post-header .cat-tag:hover { background: var(--primary-dim); }
.post-header .meta-item { font-size: 0.82rem; color: var(--text-muted); }
.post-header h1 { font-size: 1.7rem; font-weight: 700; line-height: 1.45; color: #1a1a1a; margin-bottom: 0.8rem; letter-spacing: -0.3px; }
.rating-pill { display: inline-flex; align-items: center; gap: 0.3rem; background: #fff7e6; color: #d48806; border: 1px solid #ffe58f; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.rating-pill .star { color: #faad14; }

/* Content */
.post-content { line-height: 1.85; font-size: 1.05rem; color: #333; }
.post-content p { margin-bottom: 1.1rem; }
.post-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2rem 0 1rem; color: #1a1a1a; padding-bottom: 0.4rem; border-bottom: 1px solid #eee; }
.post-content h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 0.8rem; color: #2a2a2a; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 1.2rem 0 1.5rem; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: transform 0.3s; }
.post-content img:hover { transform: scale(1.01); }
.post-content a { color: var(--primary); text-decoration: none; border-bottom: 1px dashed #ffb8b8; transition: color 0.2s, border-bottom-color 0.2s; }
.post-content a:hover { color: var(--primary-dim); border-bottom-color: var(--primary); }
.post-content blockquote { margin: 1.5rem 0; padding: 0.8rem 1.2rem; border-left: 3px solid var(--primary); background: #fafafa; border-radius: 0 6px 6px 0; color: #555; font-style: italic; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content code { background: #f5f5f5; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.92em; color: #c53030; font-family: 'SF Mono', Monaco, monospace; }
.post-content pre { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: 0.9rem; margin: 1rem 0; }
.post-content pre code { background: none; color: inherit; padding: 0; font-size: 0.9rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.post-content th, .post-content td { padding: 0.6rem 0.8rem; border: 1px solid #e0e0e0; }
.post-content th { background: #f8f8f8; font-weight: 600; text-align: left; }

/* Divider */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, #ddd, transparent); margin: 1.5rem 0; border: none; }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.post-tags a { display: inline-block; padding: 0.3rem 0.8rem; background: #f5f5f5; color: #666; text-decoration: none; border-radius: 20px; font-size: 0.8rem; border: 1px solid transparent; transition: all 0.2s; }
.post-tags a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Download section */
.download-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 2rem; text-align: center; border: 1px solid var(--border); }
.download-card h3 { font-size: 1rem; color: #444; margin-bottom: 1rem; font-weight: 600; }
.download-card h3 .icon { display: inline-block; margin-right: 0.4rem; }
.dl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.dl-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.65rem 1.5rem; color: #fff; text-decoration: none; border-radius: 8px; font-size: 0.92rem; font-weight: 500; transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0.92; }
.dl-icon { display: inline-block; width: 1em; height: 1em; font-size: 1.1em; }

/* Footer */
.footer { text-align: center; color: #bbb; font-size: 0.82rem; padding: 2rem 0 3rem; }
.footer a { color: #aaa; text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--primary); }
.footer .links { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.footer .links a { font-size: 0.82rem; }

/* Mobile */
@media (max-width: 768px) {
    .wide-container, .container { padding: 0 0.8rem; }
    .container { margin: 74px auto 2rem; }
    .card { padding: 1.2rem; border-radius: 10px; }
    .post-header h1 { font-size: 1.4rem; }
    .post-content { font-size: 1rem; }
    .dl-links { flex-direction: column; align-items: stretch; }
    .dl-btn { justify-content: center; }
    .navbar { padding: 0.6rem 0; }
    .navbar .nav-links { gap: 0.8rem; font-size: 0.8rem; }
    .navbar .logo { display: none; }
    .navbar .nav-search { flex: 1; margin-left: 0.5rem !important; max-width: none; }
    .navbar .nav-search input { width: 100% !important; }
    .navbar .auth-links { margin-left: 0; }
    .navbar .auth-links a { margin-left: 0.5rem; }
    .cover-image { max-width: 200px; }
}
