/* LinMeng Blog v3.1 - Copper & Stone Theme */
/* Warm textured UI, refined typography, enhanced interactions */

/* ==================== CSS Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== Light Theme (Default) - Copper & Stone ==================== */
:root {
    --primary-color: #b8722d;
    --primary-hover: #9e6026;
    --primary-light: rgba(184, 114, 45, 0.1);
    --primary-glow: rgba(184, 114, 45, 0.18);
    --secondary-color: #7a7268;
    --accent-color: #4a8a72;
    --bg-color: #f5f3ef;
    --bg-subtle: #edeae4;
    --card-bg: #ffffff;
    --card-bg-solid: #ffffff;
    --text-color: #1f1c18;
    --text-secondary: #5e564c;
    --text-light: #9a938a;
    --border-color: rgba(180, 170, 155, 0.45);
    --border-subtle: rgba(180, 170, 155, 0.28);
    --success-color: #4a9e7a;
    --success-light: rgba(74, 158, 122, 0.1);
    --warning-color: #c9952e;
    --warning-light: rgba(201, 149, 46, 0.1);
    --danger-color: #c24a4a;
    --danger-light: rgba(194, 74, 74, 0.1);
    --sidebar-width: 300px;
    --header-height: 64px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
    --shadow: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.10);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --code-bg: #1f1c18;
    --code-color: #e8e4dc;
    --input-bg: #ffffff;
    --hover-bg: rgba(184, 114, 45, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(180, 170, 155, 0.28);
    --gradient-primary: linear-gradient(135deg, #b8722d 0%, #c98a42 100%);
    --gradient-hero: linear-gradient(135deg, #1f1c18 0%, #3a3028 40%, #b8722d 100%);
    --gradient-card: linear-gradient(135deg, rgba(184,114,45,0.03) 0%, rgba(74,138,114,0.03) 100%);
    --theme-transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    --font-display: 'Playfair Display', 'LXGW WenKai', 'Noto Sans SC', serif;
    --font-sans: 'LXGW WenKai', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ==================== Dark Theme - Copper & Stone ==================== */
[data-theme="dark"] {
    --primary-color: #c98a42;
    --primary-hover: #a87236;
    --primary-light: rgba(201, 138, 66, 0.12);
    --primary-glow: rgba(201, 138, 66, 0.18);
    --secondary-color: #8a7e70;
    --accent-color: #5aaa88;
    --bg-color: #131210;
    --bg-subtle: #1c1a16;
    --card-bg: #23211e;
    --card-bg-solid: #23211e;
    --text-color: #e8e4dc;
    --text-secondary: #a09888;
    --text-light: #6a6258;
    --border-color: rgba(110, 100, 85, 0.4);
    --border-subtle: rgba(110, 100, 85, 0.25);
    --success-color: #5aaa88;
    --success-light: rgba(90, 170, 136, 0.12);
    --warning-color: #c9952e;
    --warning-light: rgba(201, 149, 46, 0.12);
    --danger-color: #c24a4a;
    --danger-light: rgba(194, 74, 74, 0.12);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 2px 4px rgba(0,0,0,0.35);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.5);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.6);
    --code-bg: #131210;
    --code-color: #e8e4dc;
    --input-bg: #23211e;
    --hover-bg: rgba(201, 138, 66, 0.08);
    --glass-bg: rgba(35, 33, 30, 0.72);
    --glass-border: rgba(110, 100, 85, 0.3);
    --gradient-card: linear-gradient(135deg, rgba(184,114,45,0.06) 0%, rgba(74,138,114,0.06) 100%);
}

/* System prefers dark - Copper & Stone */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #c98a42;
        --primary-hover: #a87236;
        --primary-light: rgba(201, 138, 66, 0.12);
        --primary-glow: rgba(201, 138, 66, 0.18);
        --secondary-color: #8a7e70;
        --accent-color: #5aaa88;
        --bg-color: #131210;
        --bg-subtle: #1c1a16;
        --card-bg: #23211e;
        --card-bg-solid: #23211e;
        --text-color: #e8e4dc;
        --text-secondary: #a09888;
        --text-light: #6a6258;
        --border-color: rgba(110, 100, 85, 0.4);
        --border-subtle: rgba(110, 100, 85, 0.25);
        --success-color: #5aaa88;
        --success-light: rgba(90, 170, 136, 0.12);
        --warning-color: #c9952e;
        --warning-light: rgba(201, 149, 46, 0.12);
        --danger-color: #c24a4a;
        --danger-light: rgba(194, 74, 74, 0.12);
        --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
        --shadow: 0 2px 4px rgba(0,0,0,0.35);
        --shadow-md: 0 8px 16px rgba(0,0,0,0.4);
        --shadow-lg: 0 12px 24px rgba(0,0,0,0.5);
        --shadow-xl: 0 24px 48px rgba(0,0,0,0.6);
        --code-bg: #131210;
        --code-color: #e8e4dc;
        --input-bg: #23211e;
        --hover-bg: rgba(201, 138, 66, 0.08);
        --glass-bg: rgba(35, 33, 30, 0.72);
        --glass-border: rgba(110, 100, 85, 0.3);
        --gradient-card: linear-gradient(135deg, rgba(184,114,45,0.06) 0%, rgba(74,138,114,0.06) 100%);
    }
}

/* ==================== Body & Typography ==================== */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    transition: var(--theme-transition), opacity 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    opacity: 0.98;
}

body.loaded {
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    mix-blend-mode: overlay;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--primary-color);
    color: white;
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ==================== Layout ==================== */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-wrapper {
    display: flex;
    gap: 28px;
    padding: 28px 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

/* ==================== Header ==================== */
.header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--theme-transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.logo:hover {
    color: var(--primary-color);
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.nav {
    display: flex;
    gap: 2px;
}

.nav a {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: var(--nav-line-width, 0%);
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav a:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.nav a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.nav a.active::after {
    width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme toggle */
.theme-toggle {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.theme-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* ==================== Cards ==================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    letter-spacing: -0.015em;
}

.card-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.card-body {
    padding: 24px;
}

/* ==================== Article List ==================== */
.article-list-card {
    overflow: hidden;
}

.article-list-toolbar {
    align-items: center;
    gap: 12px;
}

.article-list-toolbar .card-title {
    font-size: 1rem;
}

.article-list-summary {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.85rem;
}

.article-list-more,
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.84rem;
    font-weight: 600;
}

.article-list-more:hover,
.read-more-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.home-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.home-sort-filter {
    flex-shrink: 0;
}

.article-item {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
    position: relative;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.article-item:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.article-item:hover::before {
    opacity: 1;
}

.article-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 16px;
    transition: transform 0.4s ease;
}

.article-item:hover .article-cover {
    transform: scale(1.01);
    filter: brightness(1.05);
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 650;
    margin-bottom: 10px;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.article-title a {
    color: var(--text-color);
    transition: color 0.2s;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.article-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.article-meta .meta-item:hover {
    color: var(--primary-color);
}

.article-meta .meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.article-meta .pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--warning-light);
    color: var(--warning-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 14px;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-actions {
    margin-top: 12px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tag:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px) scale(1.03);
}

/* ==================== Article Gallery ==================== */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.article-gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/10;
}

.article-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-gallery-item:hover img {
    transform: scale(1.08);
}

.article-gallery-more {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ==================== Sidebar Widgets ==================== */
.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-header {
    font-family: var(--font-display);
    padding: 16px 20px;
    padding-left: 16px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    position: relative;
}

.widget-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.widget-header svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.widget-body {
    padding: 20px;
}

/* 主内容区底部小工具（站点统计 + 一言） */
.bottom-widgets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.bottom-widgets .widget {
    margin-bottom: 0;
}

@media (max-width: 992px) {
    .bottom-widgets {
        grid-template-columns: 1fr;
    }
}

/* Profile */
.profile {
    text-align: center;
    position: relative;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.profile-desc {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.profile-stat {
    text-align: center;
    cursor: default;
    transition: transform 0.2s;
}

.profile-stat:hover {
    transform: translateY(-2px);
}

.profile-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.profile-stat-label {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Nav Grid */
.quick-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.quick-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.quick-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Links */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.link-item:hover {
    background: var(--hover-bg);
    border-color: var(--border-subtle);
}

.link-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Sponsors */
.sponsor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sponsor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    color: var(--text-color);
}

.sponsor-item:hover {
    background: var(--hover-bg);
    border-color: var(--border-subtle);
    color: var(--text-color);
}

.sponsor-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-subtle);
}

.sponsor-icon-placeholder {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.sponsor-info {
    flex: 1;
    min-width: 0;
}

.sponsor-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsor-detail {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.sponsor-admin-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-subtle);
}

.sponsor-admin-thumb-placeholder {
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 550;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease, transform 0.25s ease;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--primary-glow);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 550;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.92rem;
    transition: all 0.25s ease;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: var(--font-sans);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* ==================== Comments ==================== */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.comment-item:hover {
    background: var(--hover-bg);
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-subtle);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 650;
    font-size: 0.9rem;
}

.comment-badge {
    padding: 2px 8px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.comment-time {
    color: var(--text-light);
    font-size: 0.78rem;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.7;
    word-break: break-word;
    font-size: 0.92rem;
}

.comment-reply {
    margin-top: 10px;
    padding: 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    margin-left: 24px;
    border-left: 2px solid var(--primary-color);
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.comment-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.comment-actions button:hover {
    color: var(--primary-color);
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    padding: 20px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: var(--card-bg-solid);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.page-link.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.page-ellipsis {
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding: 0 4px;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
}

.empty-state-icon {
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-icon svg {
    width: 48px;
    height: 48px;
    color: var(--text-light);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0 32px;
    margin-top: 48px;
    transition: var(--theme-transition);
}

.footer-inner {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    transition: color 0.2s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-brand {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ==================== Mobile Menu ==================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

/* ==================== Search & Filter ==================== */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.search-box input {
    flex: 1;
}

.search-box .btn svg {
    width: 16px;
    height: 16px;
}

.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
    margin-top: 14px;
}

.category-filter a {
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--bg-subtle);
    color: var(--text-light);
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.category-filter a:hover,
.category-filter a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ==================== Article Detail ==================== */
.article-content {
    line-height: 1.85;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-display);
    margin: 28px 0 14px;
    font-weight: 650;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content img {
    border-radius: var(--radius);
    margin: 20px 0;
    max-width: 100%;
    box-shadow: var(--shadow-md);
}

.article-content pre {
    background: var(--code-bg);
    color: var(--code-color);
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 20px 0;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    border: 1px solid var(--border-subtle);
}

.article-content code {
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--primary-color);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    margin: 20px 0;
    color: var(--text-light);
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin: 18px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 6px;
}

/* Article Actions */
.article-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.article-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.article-action-btn svg {
    width: 16px;
    height: 16px;
}

.article-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.article-action-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg-solid);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-color);
    background: var(--bg-subtle);
}

/* ==================== Lightbox ==================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* ==================== Upload Area ==================== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 16px;
    background: var(--bg-subtle);
}

.upload-area:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.upload-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ==================== Login Page ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, -1%); }
}

.login-box {
    background: var(--card-bg-solid);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    padding: 44px;
    transition: var(--theme-transition);
    position: relative;
    z-index: 1;
}

.login-title {
    font-family: var(--font-display);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 36px;
    font-size: 0.9rem;
}

/* ==================== Tag Cloud ==================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0;
    justify-content: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-subtle);
    border-radius: 24px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tag-cloud-item:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.tag-cloud-count {
    font-size: 0.72rem;
    background: var(--card-bg-solid);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.tag-cloud-item:hover .tag-cloud-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ==================== Archive ==================== */
.archive-year {
    margin-bottom: 36px;
}

.archive-year-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    letter-spacing: -0.02em;
}

.archive-month {
    margin-bottom: 24px;
    padding-left: 20px;
    border-left: 3px solid var(--border-color);
    margin-left: 8px;
}

.archive-month-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-color);
}

.archive-count {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 400;
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archive-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.archive-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.archive-item-date {
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
    min-width: 50px;
    font-weight: 500;
}

.archive-item:hover .archive-item-date {
    color: rgba(255,255,255,0.7);
}

.archive-item-title {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-item-views {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
}

.archive-item:hover .archive-item-views {
    color: rgba(255,255,255,0.7);
}

/* ==================== Reply Form ==================== */
.reply-form {
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
}

.reply-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-color);
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--primary-glow);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* ==================== Reading Progress ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1001;
    transition: width 0.1s;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* ==================== Badges ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-color);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger-color);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.badge-secondary {
    background: var(--bg-subtle);
    color: var(--text-light);
}

/* ==================== Admin Styles ==================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.admin-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-nav {
    padding: 12px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: #94a3b8;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 2px 8px;
    border-radius: var(--radius);
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255,255,255,0.08);
    color: white;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-color);
    min-height: 100vh;
    transition: var(--theme-transition);
}

.admin-header {
    background: var(--card-bg);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--theme-transition);
    border-bottom: 1px solid var(--border-subtle);
}

.admin-content {
    padding: 28px;
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.stat-card-label {
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 500;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-subtle);
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: var(--hover-bg);
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.admin-tab {
    padding: 12px 20px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.admin-tab:hover,
.admin-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    width: auto;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in {
    animation: fadeIn 0.4s ease-out both;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out both;
}

/* Staggered animation delays for list items */
.article-item:nth-child(1) { animation-delay: 0.05s; }
.article-item:nth-child(2) { animation-delay: 0.1s; }
.article-item:nth-child(3) { animation-delay: 0.15s; }
.article-item:nth-child(4) { animation-delay: 0.2s; }
.article-item:nth-child(5) { animation-delay: 0.25s; }

/* ==================== Social Page Styles ==================== */
.social-hero {
    text-align: center;
    padding: 48px 24px;
    position: relative;
}

.social-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.social-hero-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.social-hero-icon.github {
    background: linear-gradient(135deg, #333 0%, #24292e 100%);
}

.social-hero-icon.bilibili {
    background: linear-gradient(135deg, #fb7299 0%, #e04f7a 100%);
}

.social-hero h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.social-hero p {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.social-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border-subtle);
}

.social-section h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-section h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

/* ==================== Info Box ==================== */
.info-box {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.info-box h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.info-box ul {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.info-box ul li {
    margin-bottom: 4px;
}

/* ==================== Reading Time ==================== */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-light);
    padding: 4px 10px;
    background: var(--bg-subtle);
    border-radius: 20px;
    font-weight: 500;
}

.reading-time svg {
    width: 14px;
    height: 14px;
}

/* ==================== TOC (Table of Contents) ==================== */
.toc-container {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 28px;
}

.toc-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.toc-title svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 6px;
}

.toc-list a {
    display: block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.toc-list .toc-h3 {
    padding-left: 24px;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .article-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--card-bg-solid);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-xl);
        border-top: 1px solid var(--border-subtle);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        padding: 12px 16px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-inner {
        padding: 0 16px;
    }
    
    .article-item {
        padding: 18px;
    }
    
    .stat-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .article-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .article-meta {
        gap: 10px;
        font-size: 0.78rem;
    }
    
    .comment-reply {
        margin-left: 0;
    }
    
    .login-box {
        margin: 20px;
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
    
    .main-wrapper {
        padding: 14px 0;
        gap: 14px;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .article-gallery {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .article-actions {
        flex-wrap: wrap;
    }
    
    .footer-links {
        gap: 16px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .header, .sidebar, .footer, .back-to-top, .reading-progress, .article-actions {
        display: none !important;
    }
    .main-wrapper {
        padding: 0;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.about-hero {
    padding: 28px;
    background: var(--gradient-card);
    border-bottom: 1px solid var(--border-subtle);
}

.about-hero h1 {
    font-family: var(--font-display);
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.about-tile {
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: var(--bg-subtle);
}

.about-tile strong {
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .article-list-toolbar {
        flex-wrap: wrap;
    }

    .article-list-summary {
        margin-left: 0;
        width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

.article-neighbor-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.article-neighbor {
    display: block;
    padding: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    min-width: 0;
}

.article-neighbor span {
    display: block;
    color: var(--text-light);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.article-neighbor strong {
    display: block;
    color: var(--text-color);
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-neighbor:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.article-neighbor.disabled {
    opacity: 0.55;
    cursor: default;
}

.article-neighbor.next {
    text-align: right;
}

@media (max-width: 640px) {
    .article-neighbor-nav {
        grid-template-columns: 1fr;
    }

    .article-neighbor.next {
        text-align: left;
    }
}

/* ==================== Donate Page ==================== */
.donate-qrcode-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.donate-qrcode-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.donate-qrcode-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.donate-qrcode-item img {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 12px;
}

.donate-qrcode-label {
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 999px;
    display: inline-block;
}

/* ==================== Admin Article Edit Images ==================== */
.article-image-list .upload-preview-item img,
#new-images-preview .upload-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
}

/* ==================== Hitokoto Widget ==================== */
.hitokoto-widget {
    padding: 4px 0;
}

.hitokoto-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-color);
    font-style: italic;
    transition: opacity 0.3s ease;
}

.hitokoto-from {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 8px;
    text-align: right;
}

/* ==================== Weather Widget ==================== */
.weather-widget {
    text-align: center;
    padding: 8px 0;
}

.weather-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 6px;
}

.weather-temp {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.weather-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.weather-city {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

.weather-loading,
.weather-error {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 12px 0;
}

/* ==================== Music Player ==================== */
.music-player {
    padding: 4px 0;
}

.music-player-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    object-fit: cover;
    margin-bottom: 12px;
    background: var(--bg-subtle);
}

.music-player-info {
    margin-bottom: 10px;
}

.music-player-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-player-artist {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 2px;
}

.music-player-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-subtle);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
}

.music-player-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.music-player-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.music-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

.music-player-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-player-btn:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.music-player-btn.play-btn {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50%;
}

.music-player-btn.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.music-player-btn svg {
    width: 18px;
    height: 18px;
}

.music-player-btn.play-btn svg {
    width: 20px;
    height: 20px;
}

.music-player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.music-player-volume svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
}

.music-player-volume input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-subtle);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.music-player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.music-player-playlist-toggle {
    width: 100%;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 6px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.78rem;
    transition: all 0.2s;
    text-align: center;
}

.music-player-playlist-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.music-player-playlist {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.music-player-playlist.open {
    max-height: 200px;
    overflow-y: auto;
}

.music-player-playlist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.music-player-playlist-item:last-child {
    border-bottom: none;
}

.music-player-playlist-item:hover {
    color: var(--primary-color);
}

.music-player-playlist-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.music-player-playlist-item.active::before {
    content: '▶';
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ==================== Code Copy Button ==================== */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    font-family: var(--font-sans);
}

.code-copy-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== TOC Enhancements ==================== */
.toc-list a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

/* ==================== Typewriter Cursor ==================== */
[data-typewriter] {
    display: inline;
}

/* ==================== Responsive - Disable Effects ==================== */
@media (max-width: 768px) {
    .particles-canvas {
        display: none !important;
    }
    .music-player-cover {
        display: none;
    }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .particles-canvas {
        display: none !important;
    }
    [data-typewriter] {
        border-right: none !important;
    }
}
