/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --text: #111827;
    --text-light: #4b5563;
    --text-muted: #9ca3af;
    --bg: #f9fafb;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* 暗黑模式变量 */
.dark {
    --text: #f9fafb;
    --text-light: #d1d5db;
    --text-muted: #6b7280;
    --bg: #030712;
    --card: #111827;
    --border: #1f2937;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ========== 头部导航 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
}

.dark .header {
    background: rgba(3, 7, 18, 0.8);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.logo a {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--border);
    color: var(--text);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== Hero 区域 ========== */
.hero {
    position: relative;
    padding: 80px 0 100px;
    text-align: center;
    overflow: hidden;
    background: var(--card);
    transition: background-color 0.3s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 .highlight {
    color: var(--primary);
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* 背景装饰 */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.hero-blob-1 {
    background: linear-gradient(135deg, #ff80b5, #9089fc);
    top: -200px;
    right: -100px;
}

.hero-blob-2 {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    bottom: -300px;
    left: -100px;
    opacity: 0.2;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 12px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9999px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    margin-left: 12px;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    color: var(--text);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* 节假日倒计时 */
.holiday-countdown {
    margin-bottom: 32px;
    padding: 20px 32px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.dark .holiday-countdown {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.holiday-countdown .holiday-icon {
    font-size: 2rem;
}

.holiday-countdown .holiday-info {
    text-align: left;
}

.holiday-countdown .holiday-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.holiday-countdown .holiday-days {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.holiday-countdown .holiday-days strong {
    font-size: 1.5rem;
    font-weight: 800;
}

.holiday-loading {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background: var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    padding: 12px 16px;
}

.btn-ghost:hover {
    color: var(--primary);
}

.btn-ghost .arrow {
    transition: transform 0.2s;
}

.btn-ghost:hover .arrow {
    transform: translateX(4px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

/* ========== 文章列表区域 ========== */
.main {
    padding: 64px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: var(--border);
    color: var(--text);
}

.filter-tab.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.dark .filter-tab.active {
    background: rgba(99, 102, 241, 0.2);
}

/* ========== 文章卡片 ========== */
.posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dark .post-card {
    box-shadow: none;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.dark .post-card:hover {
    border-color: var(--primary);
}

.post-card-cover {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-cover img {
    transform: scale(1.05);
}

.post-card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
}

.dark .post-card-tag {
    background: rgba(17, 24, 39, 0.9);
}

.post-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card-meta svg {
    width: 14px;
    height: 14px;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.post-card:hover .post-card-title {
    color: var(--primary);
}

.post-card-excerpt {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.post-card-footer {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.post-card-footer svg {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    transition: transform 0.2s;
}

.post-card:hover .post-card-footer svg {
    transform: translateX(4px);
}

/* ========== 文章详情 ========== */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.post-detail-header {
    position: relative;
    height: 400px;
    margin-bottom: 48px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.post-detail-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-detail-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
}

.post-detail-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    color: white;
}

.post-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.post-detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
}

.post-detail-tag svg {
    width: 12px;
    height: 12px;
}

.post-detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
}

.post-detail-content {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--text);
}

.post-detail-content p {
    margin-bottom: 24px;
}

.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3 {
    margin: 48px 0 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.post-detail-content h2 {
    font-size: 1.5rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.post-detail-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 32px 0;
}

.post-detail-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-detail-content a:hover {
    color: var(--primary-dark);
}

.post-detail-content code {
    padding: 2px 6px;
    font-size: 0.875em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: var(--border);
    border-radius: 4px;
    color: var(--primary-dark);
}

.post-detail-content pre {
    padding: 24px;
    margin: 32px 0;
    background: #1e293b;
    border-radius: var(--radius);
    overflow-x: auto;
}

.post-detail-content pre code {
    padding: 0;
    background: none;
    color: #e2e8f0;
}

/* 作者信息 */
.author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.author-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--border);
    border-radius: 50%;
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.author-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== 评论区域 ========== */
.comments-section {
    max-width: 800px;
    margin: 48px auto 0;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.comments-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.comment-form {
    padding: 24px;
    margin-bottom: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
    margin-bottom: 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.comment-item:hover {
    border-color: var(--primary-light);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9375rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.btn-delete-comment {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-comment:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.comment-content {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== 管理后台 ========== */
.login-section {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.login-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-panel {
    max-width: 900px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.card {
    padding: 32px;
    margin-bottom: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.post-form input[type="text"],
.post-form textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.post-form input:focus,
.post-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.post-form textarea {
    min-height: 200px;
    resize: vertical;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.image-upload {
    margin-bottom: 16px;
}

.image-upload label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.tag-select {
    margin-bottom: 16px;
}

.tag-select label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.tag-select select {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-select select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.image-upload input[type="file"] {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload input[type="file"]:hover {
    border-color: var(--primary);
}

.image-preview {
    margin-top: 12px;
}

.image-preview img {
    max-width: 200px;
    border-radius: 8px;
}

.content-editor label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.toolbar-btn {
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.admin-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: 8px;
    transition: background 0.2s;
}

.admin-post-item:hover {
    background: var(--border);
}

.admin-post-title {
    font-weight: 500;
}

.admin-post-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

.admin-post-actions {
    display: flex;
    gap: 8px;
}

.form-actions {
    display: flex;
    gap: 12px;
}

/* ========== 页脚 ========== */
.footer {
    margin-top: auto;
    padding: 48px 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-light);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-subscribe h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-subscribe p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.subscribe-form {
    display: flex;
    gap: 8px;
}

.subscribe-form input {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== 工具类 ========== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.loading::before {
    content: '';
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background: #1f2937;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        padding-left: 0;
        border-left: none;
    }

    .posts {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .post-detail-header {
        height: 300px;
    }

    .post-detail-title {
        font-size: 1.75rem;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .admin-post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
