/* ============================================
   萌式博客 moeblog - Main Stylesheet
   灵感来源：gxroast.com 冰狱博客
   ============================================ */

/* ========== CSS Reset ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, textarea, button { font-family: inherit; font-size: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }

/* ========== CSS Variables ========== */
:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5a52;
    --primary-light: #ff8e8e;
    --primary-blue: #3498db;
    --primary-green: #2ecc71;
    --primary-orange: #e67e22;
    --primary-purple: #9b59b6;

    --bg-page: #f0f2f5;
    --bg-card: #ffffff;
    --bg-tag: #f0f1f3;
    --bg-hover: #f8f9fa;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    --text-primary: #1a1a2e;
    --text-secondary: #33334d;
    --text-tertiary: #666680;
    --text-muted: #9999aa;
    --text-placeholder: #b0b0c0;

    --border-light: #e8e8ee;
    --border-default: #d0d0dc;

    --dot-red: #ff5f57;
    --dot-yellow: #febc2e;
    --dot-green: #28c840;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);

    --navbar-height: 60px;
    --container-max: 1280px;
    --sidebar-width: 320px;
    --gap: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
body.dark-mode {
    --bg-page: #1a1a2e;
    --bg-card: #252540;
    --bg-tag: #2d2d4a;
    --bg-hover: #2d2d4a;
    --text-primary: #e8e8f0;
    --text-secondary: #c8c8d8;
    --text-tertiary: #a0a0b8;
    --text-muted: #787890;
    --text-placeholder: #606070;
    --border-light: #353550;
    --border-default: #404060;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: 1000;
    background: rgba(26, 26, 46, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition);
}
.navbar.scrolled {
    background: rgba(26, 26, 46, 0.92);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.15);
}
.navbar-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo */
.navbar-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo-img {
    height: 32px;
    width: auto;
    border-radius: var(--radius-sm);
}
.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
.logo-accent {
    color: var(--primary);
    margin-right: 2px;
}

/* Navigation menu */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}
.nav-item svg {
    color: var(--icon-color);
    flex-shrink: 0;
    transition: transform var(--transition);
}
.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.nav-item:hover svg {
    transform: scale(1.2);
}
.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* Navbar right */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.btn-login {
    padding: 8px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    color: #fff;
}

/* Mobile toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
}
.navbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition);
}
.navbar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ========== Hero Section ========== */
.hero {
    position: relative;
    height: var(--hero-height, 100vh);
    min-height: var(--hero-min-height, 600px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}
.hero-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}
.hero-subtitle {
    display: inline-block;
    padding: 10px 28px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    animation: fadeInUp 1s ease 0.3s both;
}
.hero-subtitle .cursor {
    animation: blink 0.8s infinite;
    font-weight: 300;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounceDown 2s infinite;
}
.scroll-indicator {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ========== Main Layout ========== */
.main-wrapper {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--gap) 20px;
}
.content-area {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
}
.content-main {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - var(--navbar-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-default) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 2px; }

/* ========== Article Grid ========== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Article Card */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.article-card-link {
    display: block;
    color: inherit;
}
.article-cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--bg-hover);
}
.article-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.article-card:hover .article-cover img {
    transform: scale(1.08);
}
.top-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}
.top-flag.sort-top {
    background: linear-gradient(135deg, var(--primary-orange), #f39c12);
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.4);
}
.article-body {
    padding: 16px 18px 18px;
}
.article-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.article-date svg {
    color: var(--text-tertiary);
}
.article-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color var(--transition);
}
.article-card:hover .article-title {
    color: var(--primary);
}
.article-excerpt {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.article-views, .article-comments {
    display: flex;
    align-items: center;
    gap: 4px;
}
.article-views svg { color: var(--primary); }
.article-comments svg { color: var(--primary-blue); }
.article-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.log-sort {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--bg-tag);
    color: var(--text-tertiary);
    font-size: 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.log-sort:hover {
    background: var(--primary);
    color: #fff;
}
.log-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--bg-tag);
    color: var(--text-tertiary);
    font-size: 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.log-tag:hover {
    background: var(--primary-blue);
    color: #fff;
}

/* ========== Sidebar Cards ========== */
.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.sidebar-card:hover {
    box-shadow: var(--shadow-md);
}
.sidebar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
}
.sidebar-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.sidebar-card-title svg {
    color: var(--primary);
}

/* macOS style dots */
.card-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background: var(--dot-red); }
.dot-yellow { background: var(--dot-yellow); }
.dot-green { background: var(--dot-green); }

/* Profile Card */
.profile-card {
    background: var(--bg-card);
    overflow: visible;
}
.profile-bg {
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--primary-blue));
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.profile-content {
    padding: 0 18px 18px;
    text-align: center;
    margin-top: -36px;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-md);
    background: var(--bg-hover);
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.profile-bio {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}
.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}
.profile-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}
.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tag);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.social-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Search Box */
.search-wrap {
    padding: 4px 16px 16px;
}
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    padding: 4px 4px 4px 12px;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.search-form:focus-within {
    border-color: var(--primary);
    background: var(--bg-card);
}
.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    min-width: 0;
}
.search-input::placeholder {
    color: var(--text-placeholder);
}
.search-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}
.search-btn:hover {
    background: var(--primary-dark);
}

/* Recommend List */
.recommend-list {
    padding: 0 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.recommend-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    transition: opacity var(--transition);
}
.recommend-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.recommend-item:hover {
    opacity: 0.8;
}
.recommend-thumb {
    width: 64px;
    height: 48px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-hover);
}
.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.recommend-info {
    flex: 1;
    min-width: 0;
}
.recommend-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
    transition: color var(--transition);
}
.recommend-item:hover .recommend-title {
    color: var(--primary);
}
.recommend-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Hot List */
.hot-list {
    padding: 0 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hot-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.hot-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.hot-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: var(--text-muted);
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #b87333); }
.hot-content {
    flex: 1;
    min-width: 0;
}
.hot-title {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition);
}
.hot-title:hover {
    color: var(--primary);
}
.hot-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.hot-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Tag Cloud */
.tag-cloud {
    padding: 0 18px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    padding: 4px 12px;
    background: var(--bg-tag);
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.4;
    transition: all var(--transition);
}
.tag-item:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* Sort List */
.sort-list {
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sort-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.sort-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
    padding-left: 16px;
}
.sort-name { font-weight: 500; }
.sort-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tag);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Comment List (sidebar) */
.comment-list {
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    display: flex;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-hover);
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.comment-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.comment-post {
    font-size: 12px;
    color: var(--primary);
}

/* Empty state */
.empty-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    padding: 20px 0;
}
.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 0 10px;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}
.pagination a:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.pagination .current {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* ========== Article Detail ========== */
.article-detail-main {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-tertiary);
}
.breadcrumb a:hover {
    color: var(--primary);
}
.breadcrumb .separator {
    color: var(--text-placeholder);
}
.breadcrumb .current {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.article-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 16px;
}
.article-detail-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-muted);
}
.detail-author, .detail-date, .detail-views, .detail-comments {
    display: flex;
    align-items: center;
    gap: 5px;
}
.detail-author svg { color: var(--primary-purple); }
.detail-date svg { color: var(--primary-blue); }
.detail-views svg { color: var(--primary); }
.detail-comments svg { color: var(--primary-green); }
.edit-link {
    margin-left: 8px;
    padding: 2px 10px;
    background: var(--bg-tag);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.article-detail-cover {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    max-height: 400px;
}
.article-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Content */
.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    word-break: break-word;
}
.article-content p { margin-bottom: 16px; }
.article-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 28px 0 14px;
    color: var(--text-primary);
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}
.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}
.article-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text-primary);
}
.article-content img {
    border-radius: var(--radius-md);
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.article-content blockquote {
    margin: 16px 0;
    padding: 12px 20px;
    border-left: 4px solid var(--primary);
    background: var(--bg-hover);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-tertiary);
}
.article-content blockquote p { margin-bottom: 0; }
.article-content code {
    padding: 2px 6px;
    background: var(--bg-tag);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: var(--primary);
}
.article-content pre {
    margin: 16px 0;
    padding: 16px 20px;
    background: #1a1a2e;
    border-radius: var(--radius-md);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}
.article-content pre code {
    background: transparent;
    color: #e8e8f0;
    padding: 0;
}
.article-content ul, .article-content ol {
    margin: 12px 0 16px;
    padding-left: 24px;
}
.article-content ul li { list-style: disc; margin-bottom: 6px; }
.article-content ol li { list-style: decimal; margin-bottom: 6px; }
.article-content a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-decoration-color: rgba(52, 152, 219, 0.3);
    text-underline-offset: 3px;
}
.article-content a:hover {
    text-decoration-color: var(--primary-blue);
}
.article-content table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.article-content th,
.article-content td {
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    text-align: left;
}
.article-content th {
    background: var(--bg-hover);
    font-weight: 600;
    color: var(--text-primary);
}
.article-content hr {
    border: none;
    height: 1px;
    background: var(--border-light);
    margin: 24px 0;
}

/* Article Tags */
.article-detail-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.article-detail-tags svg {
    color: var(--text-muted);
}

/* Copyright */
.article-copyright {
    margin-top: 20px;
    padding: 14px 20px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    font-size: 13px;
    color: var(--text-muted);
}
.article-copyright a {
    color: var(--primary);
}

/* Neighbor Log */
.neighbor-log {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}
.neighbor-prev, .neighbor-next {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    min-width: 0;
}
.neighbor-prev:hover, .neighbor-next:hover {
    background: var(--bg-tag);
    transform: translateY(-2px);
}
.neighbor-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.neighbor-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.neighbor-next { text-align: right; }

/* ========== Comments ========== */
.comment-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-light);
}
.comment-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}
.comment-section-title svg {
    color: var(--primary-blue);
}
.comment-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 15px;
}
.comment-list-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}
.comment-detail {
    display: flex;
    gap: 14px;
}
.comment-avatar-box {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-hover);
}
.comment-avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-detail-body {
    flex: 1;
    min-width: 0;
}
.comment-detail-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.comment-detail-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
.comment-badge {
    padding: 1px 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 11px;
    border-radius: var(--radius-full);
}
.comment-detail-date {
    font-size: 12px;
    color: var(--text-muted);
}
.comment-detail-content {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.7;
    padding: 10px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
}
.comment-detail-actions {
    display: flex;
    gap: 12px;
}
.comment-reply {
    font-size: 12px;
    color: var(--text-muted);
}
.comment-reply:hover {
    color: var(--primary);
}
.comment-children {
    margin-top: 16px;
    padding-left: 20px;
    border-left: 2px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Comment Form */
.comment-form-wrap {
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.comment-form-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-form-row {
    display: flex;
    gap: 12px;
}
.comment-form-row .comment-form-field {
    flex: 1;
}
.comment-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--transition);
}
.comment-input:focus {
    border-color: var(--primary);
}
.comment-input::placeholder {
    color: var(--text-placeholder);
}
.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    transition: border-color var(--transition);
}
.comment-textarea:focus {
    border-color: var(--primary);
}
.comment-verify {
    display: flex;
    gap: 12px;
    align-items: center;
}
.comment-verify .comment-input {
    width: 120px;
}
.comment-verify img {
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.comment-submit {
    align-self: flex-start;
    padding: 10px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}
.reply-hint {
    font-size: 13px;
    color: var(--text-muted);
    align-self: center;
}
.cancel-reply {
    color: var(--primary);
    font-size: 12px;
    margin-left: 4px;
}

/* ========== Page Banner ========== */
.page-banner {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.page-banner-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Page Detail */
.page-detail {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.page-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== 404 Page ========== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}
.error-404-code {
    font-size: 96px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}
.error-404-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.error-404-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}
.error-404-btn {
    display: inline-block;
    padding: 10px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.error-404-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
    color: #fff;
}

/* Password Page */
.password-form-wrap {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
}
.password-form-inner {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 48px;
    text-align: center;
    box-shadow: var(--shadow-md);
    max-width: 400px;
    width: 100%;
}
.password-form-inner svg {
    color: var(--primary);
    margin-bottom: 16px;
}
.password-form-inner h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.password-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.password-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.password-input {
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 15px;
    color: var(--text-primary);
}
.password-input:focus {
    border-color: var(--primary);
}
.password-btn {
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.password-btn:hover {
    transform: translateY(-1px);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state svg {
    color: var(--border-default);
    margin-bottom: 16px;
}
.empty-state p {
    font-size: 16px;
}

/* ========== Floating Tools ========== */
.float-tools {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.float-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}
.float-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.float-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.icon-moon { display: none; }
body.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: block; }

/* ========== Footer ========== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    padding: 32px 0;
    margin-top: 40px;
}
.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.footer-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.6;
}
.footer-copyright {
    font-weight: 600;
    color: var(--text-tertiary) !important;
}
.footer-link {
    color: var(--primary);
}
.footer-link:hover {
    text-decoration: underline;
}
.footer-sep {
    margin: 0 6px;
    color: var(--text-placeholder);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
        --gap: 16px;
    }
    .article-grid {
        gap: 12px;
    }
}

@media (max-width: 860px) {
    .content-area {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
    }
    /* Mobile: sidebar is in drawer, hide inline sidebar */
    .content-area .sidebar {
        display: none;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile: nav menu items are in drawer, hide navbar-menu */
    .navbar-menu {
        display: none;
    }
    .navbar-toggle {
        display: flex;
    }
    .hero {
        min-height: 400px;
        height: 60vh;
    }
    .article-detail-main {
        padding: 20px 16px;
    }
    .page-detail {
        padding: 20px 16px;
    }
    .neighbor-log {
        flex-direction: column;
    }
    .comment-form-row {
        flex-direction: column;
    }
    .float-tools {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 14px;
        padding: 8px 16px;
    }
    .article-detail-title {
        font-size: 20px;
    }
    .error-404-code {
        font-size: 72px;
    }
    .btn-login {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== Selection ========== */
::selection {
    background: var(--primary);
    color: #fff;
}

/* ========== Hero Wave Effect ========== */
.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.hero-waves .wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    fill: var(--wave-color, #f0f2f5);
    animation: waveMove 12s linear infinite;
    transform-origin: center bottom;
}
.hero-waves .wave-1 {
    animation-duration: 10s;
    opacity: 0.6;
    z-index: 3;
}
.hero-waves .wave-2 {
    animation-duration: 14s;
    animation-direction: reverse;
    opacity: 0.5;
    z-index: 2;
}
.hero-waves .wave-3 {
    animation-duration: 18s;
    opacity: 0.4;
    z-index: 1;
}
body.dark-mode .hero-waves .wave {
    fill: var(--wave-color-dark, #1a1a2e);
}
@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (max-width: 768px) {
    .hero-waves { height: 60px; }
}

/* ========== Mobile Article Image Fix ========== */
@media (max-width: 768px) {
    .article-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
        border-radius: var(--radius-sm);
    }
    .article-content video,
    .article-content iframe {
        max-width: 100% !important;
        width: 100% !important;
    }
    .article-content pre {
        white-space: pre-wrap;
        word-wrap: break-word;
        word-break: break-all;
        font-size: 12px;
    }
    .article-detail-cover {
        max-height: 220px;
        border-radius: var(--radius-md);
    }
    .article-detail-cover img {
        object-fit: cover;
    }
}

/* ========== Lightbox ========== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lightbox.active {
    display: flex;
    opacity: 1;
}
.lightbox-container {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    animation: lightboxZoom 0.3s ease;
}
@keyframes lightboxZoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}
.lightbox-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary);
}
.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 16px;
    border-radius: var(--radius-full);
}
@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* ========== Mobile Sidebar Drawer ========== */
/* FAB button removed - drawer triggered by hamburger menu */

.sidebar-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.sidebar-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-page);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
}
.sidebar-drawer.active {
    transform: translateX(0);
}
.sidebar-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.sidebar-drawer-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}
.sidebar-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar-drawer-close:hover {
    background: var(--primary);
}

/* Drawer nav */
.sidebar-drawer-nav {
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}
.drawer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}
.drawer-nav-item svg {
    color: var(--primary);
    flex-shrink: 0;
}
.drawer-nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
    padding-left: 16px;
}
.drawer-nav-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tag);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Drawer content (cloned sidebar cards) */
.sidebar-drawer-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sidebar-drawer-content .sidebar-card {
    border-radius: var(--radius-lg);
}
.sidebar-drawer-content .sidebar {
    position: static !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 16px;
}

/* Mobile: hide inline sidebar, use drawer */
@media (max-width: 860px) {
    .content-area .sidebar {
        display: none;
    }
}
@media (min-width: 861px) {
    .sidebar-drawer-overlay,
    .sidebar-drawer {
        display: none !important;
    }
}

/* ========== Login/Register Card ========== */
.login-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 16px;
}
.profile-actions .btn-login,
.profile-actions .btn-register,
.profile-actions .btn-logout {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.profile-actions .btn-register,
.profile-actions .btn-logout {
    background: var(--bg-tag);
    color: var(--text-secondary);
}
.profile-actions .btn-register:hover {
    background: var(--primary);
    color: #fff;
}
.profile-actions .btn-logout:hover {
    background: var(--text-muted);
    color: #fff;
}

/* ========== Comment Scroll (Marquee) ========== */
.comment-scroll-wrap {
    height: 220px;
    overflow: hidden;
    padding: 0 18px 16px;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.comment-scroll-list {
    animation: commentScrollUp 20s linear infinite;
}
.comment-scroll-list:hover {
    animation-play-state: paused;
}
@keyframes commentScrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
/* Comment meta (device/location) */
.comment-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-tag);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.comment-meta-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ========== Mobile Cover Image Fix ========== */
@media (max-width: 768px) {
    .article-cover {
        padding-top: 52%;
    }
    .article-cover img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    .recommend-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .article-detail-cover img {
        width: 100%;
        height: auto;
        max-height: 240px;
        object-fit: cover;
    }
}
