/*
Theme Name: OOYCC
Theme URI: https://ooycc.com
Author: OOYCC Team
Author URI: https://ooycc.com
Description: 现代资源分享博客主题，支持百度网盘/迅雷云盘/夸克网盘/UC网盘链接上传，前台卡片式展示，内置轮播+排行榜+日夜切换。
Version: 1.0.0
License: GPL v2 or later
Text Domain: reshub
Tags: resources, download, cloud-storage, dark-mode, responsive, modern
*/

/* ========== CSS Variables ========== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #161622;
    --bg-card-hover: #1e1e2e;
    --bg-input: #1a1a28;
    --border-color: #252538;
    --border-light: #2a2a3d;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;

    --accent-primary: #0066ff;
    --accent-secondary: #0044cc;
    --accent-glow: rgba(0, 102, 255, 0.3);

    --gradient-1: linear-gradient(135deg, #0066ff, #0044cc);
    --gradient-2: linear-gradient(135deg, #f43f5e, #ec4899);
    --gradient-3: linear-gradient(135deg, #06b6d4, #10b981);
    --gradient-4: linear-gradient(135deg, #f59e0b, #ef4444);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --navbar-height: 64px;
    --bottom-nav-height: 64px;
    --container-padding: 24px;
    --sidebar-width: 280px;
}

[data-theme="light"] {
    --bg-primary: #f8f8fc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f4fb;
    --bg-input: #f0f0f5;
    --border-color: #e4e4ef;
    --border-light: #ececf4;

    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #9a9ab5;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    transition: background-color var(--transition-base), color var(--transition-base);
}

body.sidebar-open { overflow: hidden; }
body.search-open { overflow: hidden; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; height: auto; }

/* Utility */
.mobile-only { display: none !important; }

@media (max-width: 1024px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.overlay.active { opacity: 1; pointer-events: auto; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

[data-theme="light"] .navbar { background: rgba(248, 248, 252, 0.8); }

.navbar .container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 16px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    padding: 8px 6px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
    transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px; height: 36px;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search */
.nav-search { flex: 1; max-width: 480px; position: relative; }

.nav-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.nav-search input {
    width: 100%;
    height: 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 44px 0 42px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    outline: none;
}

.nav-search input::placeholder { color: var(--text-muted); }
.nav-search input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover { border-color: var(--accent-primary); background: rgba(0, 102, 255, 0.08); }

.btn-icon {
    width: 40px; height: 40px;
    padding: 0;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-icon:hover { color: var(--accent-primary); border-color: var(--accent-primary); }

.btn-load-more {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-load-more:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-toggle {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { color: var(--accent-primary); border-color: var(--accent-primary); }

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
    background: var(--bg-primary);
    padding: 12px 16px;
    transform: translateY(-100%);
    transition: transform var(--transition-base);
}
.mobile-search-overlay.active { transform: translateY(0); }

.mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-search-back {
    width: 40px; height: 40px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 16px;
    height: 42px;
}
.mobile-search-input-wrap i { color: var(--text-muted); font-size: 14px; }
.mobile-search-input-wrap input {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-family);
}
.mobile-search-input-wrap input::placeholder { color: var(--text-muted); }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    z-index: 1600;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-close {
    width: 36px; height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
}
.sidebar-close:hover { color: var(--text-primary); border-color: var(--text-secondary); }

.sidebar-links { padding: 12px; display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.sidebar-link i { width: 20px; text-align: center; font-size: 16px; }
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(0, 102, 255, 0.08);
    color: var(--accent-primary);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 20px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: calc(var(--navbar-height) + 20px) 0 0;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}
.hero-glow-1 {
    width: 500px; height: 500px;
    background: var(--accent-primary);
    top: -120px; left: -120px;
    animation: floatGlow 8s ease-in-out infinite;
}
.hero-glow-2 {
    width: 400px; height: 400px;
    background: var(--accent-secondary);
    bottom: 40px; right: -80px;
    animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-top {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.badge-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(30px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto; margin-right: auto;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(14px, 1.8vw, 17px);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Hero 左右分栏 */
.hero-main {
    display: grid;
    grid-template-columns: 58% 42%;
    gap: 32px;
    position: relative;
    z-index: 1;
    min-height: 420px;
    margin-bottom: 24px;
}

/* 轮播 */
.hero-carousel {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.carousel-viewport { position: relative; width: 100%; height: 100%; min-height: 420px; }

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-slide-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide.active .carousel-slide-bg {
    animation: slidePulse 4s ease-in-out infinite;
}
.carousel-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.85;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}
.carousel-slide.active .carousel-slide-img {
    animation: slidePulse 4s ease-in-out infinite;
}
.carousel-slide:hover .carousel-slide-img {
    opacity: 1;
}

@keyframes slidePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.carousel-slide-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.carousel-slide-icon {
    font-size: 72px;
    color: rgba(255,255,255,0.9);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
    margin-bottom: 20px;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.carousel-slide-label {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.carousel-slide-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.carousel-slide-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    max-width: 340px;
    margin: 0 auto;
    line-height: 1.5;
}

.carousel-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}
.carousel-dot:hover { background: rgba(255,255,255,0.6); }
.carousel-dot.active {
    background: white;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
    width: 28px;
    border-radius: 5px;
}

/* 排行榜 */
.hero-ranking {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.ranking-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
}

.ranking-crown {
    color: #f59e0b;
    font-size: 18px;
    animation: crownBounce 2s ease-in-out infinite;
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.ranking-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    padding: 3px;
}

.ranking-tab {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.ranking-tab:hover { color: var(--text-secondary); }
.ranking-tab.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.ranking-list { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}
.ranking-item:hover { background: var(--bg-card-hover); transform: translateX(4px); }

.ranking-index {
    width: 26px; height: 26px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg-input);
    color: var(--text-muted);
}

.ranking-item:nth-child(1) .ranking-index {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}
.ranking-item:nth-child(2) .ranking-index {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(148,163,184,0.4);
}
.ranking-item:nth-child(3) .ranking-index {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217,119,6,0.4);
}

.ranking-item:nth-child(1) .ranking-name { font-weight: 700; color: var(--text-primary); }

.ranking-icon-wrap {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: white;
    overflow: hidden;
}
.ranking-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ranking-info { flex: 1; min-width: 0; }

.ranking-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ranking-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    gap: 10px;
}
.ranking-meta span { display: flex; align-items: center; gap: 3px; }

.ranking-trend {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.ranking-trend.up { color: #10b981; }
.ranking-trend.down { color: #ef4444; }
.ranking-trend.stable { color: var(--text-muted); }

/* Categories */
.categories {
    position: sticky;
    top: var(--navbar-height);
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-base);
}

.categories-scroll {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.category-btn:active { transform: scale(0.96); }
.category-btn:hover { border-color: var(--accent-primary); color: var(--text-primary); background: var(--bg-card-hover); }
.category-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* Resources Section */
.resources { padding: 40px 0 80px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-header.centered { flex-direction: column; text-align: center; gap: 12px; }

.section-title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-actions { display: flex; align-items: center; gap: 12px; }
.section-desc { color: var(--text-secondary); font-size: 15px; }

.result-count { font-size: 13px; color: var(--text-muted); }

.sort-select select {
    padding: 10px 36px 10px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-family);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b6b80' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all var(--transition-fast);
    outline: none;
}
.sort-select select:focus { border-color: var(--accent-primary); }

/* Resource Cards */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.resource-card:active { transform: scale(0.98); }

@media (hover: hover) {
    .resource-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent-primary);
        box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
        background: var(--bg-card-hover);
    }
    .resource-card:hover .card-image-bg { transform: scale(1.05); }
    .resource-card:hover .card-image-icon { transform: scale(1.1); }
}

.card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-bg {
    position: absolute;
    inset: 0;
    transition: transform var(--transition-slow);
}

/* WP featured image support */
.card-image img.card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.card-image-icon {
    position: relative;
    z-index: 1;
    font-size: 48px;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform var(--transition-slow);
}

.card-tag {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.tag-free { background: rgba(16,185,129,0.2); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.tag-premium { background: rgba(245,158,11,0.2); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }

.card-body { padding: 16px; }

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta { display: flex; align-items: center; justify-content: space-between; }

.card-category-label {
    font-size: 11px;
    color: var(--accent-primary);
    background: rgba(0,102,255,0.1);
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.card-stats { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.card-stats span { display: flex; align-items: center; gap: 4px; }

/* Features Section */
.features { padding: 60px 0 80px; border-top: 1px solid var(--border-color); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    margin-top: 36px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all var(--transition-base);
}
@media (hover: hover) {
    .feature-card:hover { border-color: var(--accent-primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}

.feature-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    background: rgba(0,102,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: var(--accent-primary);
}
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ========== Single Resource Page ========== */
.single-resource { padding: calc(var(--navbar-height) + 40px) 0 60px; }

.single-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 32px;
}

.single-hero-top {
    position: relative;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.single-hero-top .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.single-hero-icon {
    position: relative;
    z-index: 1;
    font-size: 80px;
    color: rgba(255,255,255,0.9);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}

.single-hero-body { padding: 32px; }

.single-hero-body h1 {
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.single-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.single-meta-row span { display: flex; align-items: center; gap: 5px; }
.single-meta-row .cat-label {
    color: var(--accent-primary);
    background: rgba(0,102,255,0.1);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.single-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Download Section */
.download-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 32px;
}

.download-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-section .download-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.download-card {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
    transition: all var(--transition-base);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 0;
}
.download-card.baidu::before { background: linear-gradient(135deg, rgba(41,98,255,0.08), rgba(41,98,255,0.02)); }
.download-card.xunlei::before { background: linear-gradient(135deg, rgba(0,171,255,0.08), rgba(0,171,255,0.02)); }
.download-card.kuake::before { background: linear-gradient(135deg, rgba(255,107,0,0.08), rgba(255,107,0,0.02)); }
.download-card.uc::before { background: linear-gradient(135deg, rgba(7,193,96,0.08), rgba(7,193,96,0.02)); }

.download-card:hover { transform: translateY(-2px); border-color: var(--accent-primary); }
.download-card:hover::before { opacity: 1; }

.download-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.download-card-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.download-card.baidu .download-card-icon { background: linear-gradient(135deg, #2962ff, #448aff); }
.download-card.xunlei .download-card-icon { background: linear-gradient(135deg, #00abff, #0091ea); }
.download-card.kuake .download-card-icon { background: linear-gradient(135deg, #ff6b00, #ff9100); }
.download-card.uc .download-card-icon { background: linear-gradient(135deg, #07c160, #00a854); }

.download-card-name {
    font-size: 15px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.download-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.download-card-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: all var(--transition-fast);
    z-index: 1;
}
.download-card:hover .download-card-arrow { color: var(--accent-primary); transform: translateY(-50%) translateX(3px); }

.download-no-link {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 24px;
    grid-column: 1 / -1;
}

/* ========== Admin Panel Styles (Front-end login/upload form) ========== */
.upload-form-wrap {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
    transition: all var(--transition-base);
}
.upload-form-wrap:hover { border-color: var(--accent-primary); }

.upload-form-wrap .upload-icon {
    font-size: 48px;
    color: var(--accent-primary);
    margin-bottom: 16px;
    opacity: 0.8;
}
.upload-form-wrap h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.upload-form-wrap p { color: var(--text-muted); font-size: 14px; }

/* ========== Footer ========== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 56px 0 28px;
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin-top: 14px; max-width: 280px; }

.social-links { display: flex; gap: 10px; margin-top: 16px; }

.social-links a {
    width: 38px; height: 38px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 15px;
    transition: all var(--transition-fast);
}
.social-links a:active { transform: scale(0.9); }
@media (hover: hover) {
    .social-links a:hover { color: var(--accent-primary); border-color: var(--accent-primary); background: rgba(0,102,255,0.08); }
}

.footer-links h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--accent-primary); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.heart-icon { color: #f43f5e; animation: pulse 1.5s ease-in-out infinite; }

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 500;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item:active { transform: scale(0.9); }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--accent-primary); }

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.no-results i { font-size: 44px; margin-bottom: 14px; display: block; opacity: 0.5; }
.no-results h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 6px; }

/* Load More */
.load-more { text-align: center; margin-top: 32px; }

/* ========== 渐变色背景类（资源卡片 & 详情页） ========== */
.gradient-1 { background: var(--gradient-1) !important; }
.gradient-2 { background: var(--gradient-2) !important; }
.gradient-3 { background: var(--gradient-3) !important; }
.gradient-4 { background: var(--gradient-4) !important; }

/* ========== Responsive ========== */
@media (min-width: 1400px) { .resources-grid { gap: 24px; } }

@media (max-width: 1024px) {
    :root { --container-padding: 20px; }
    .hamburger { display: flex; }
    .nav-search.desktop-only { display: none; }
    .nav-brand { margin-left: 0; }
    .hero-main { gap: 20px; min-height: 360px; }
    .carousel-viewport { min-height: 360px; }
    .carousel-slide-icon { font-size: 56px; }
    .carousel-slide-title { font-size: 20px; }
    .hero-ranking { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .resources-grid { gap: 16px; }
    .load-more { margin-bottom: calc(var(--bottom-nav-height) + 24px); }
    .footer { padding-bottom: calc(var(--bottom-nav-height) + 32px); }
}

@media (max-width: 768px) {
    :root { --container-padding: 16px; }
    .hero-main { grid-template-columns: 1fr; min-height: auto; gap: 16px; }
    .carousel-viewport { min-height: 260px; }
    .carousel-slide-icon { font-size: 52px; }
    .carousel-slide-title { font-size: 20px; }
    .carousel-slide-content { padding: 28px; }
    .hero-ranking { max-height: 360px; }
    .hero-title { font-size: clamp(28px, 7vw, 48px); }
    .single-hero-top { height: 200px; }
    .resources-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
    .features-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .feature-card { padding: 20px 16px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .download-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .hero-main { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
    .hero-top { margin-bottom: 24px; }
    .carousel-viewport { min-height: 220px; }
    .carousel-slide-icon { font-size: 44px; }
    .carousel-slide-title { font-size: 18px; }
    .carousel-slide-desc { font-size: 13px; }
    .carousel-slide-content { padding: 20px; }
    .hero-ranking { padding: 16px; }
    .resources-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card-image { height: 120px; }
    .card-image-icon { font-size: 36px; }
    .card-body { padding: 12px; }
    .card-title { font-size: 14px; }
    .card-desc { font-size: 12px; -webkit-line-clamp: 2; }
    .card-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
    .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature-card { padding: 16px 12px; }
    .feature-icon { width: 42px; height: 42px; font-size: 18px; margin-bottom: 12px; }
    .feature-card h3 { font-size: 15px; }
    .feature-card p { font-size: 13px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .single-hero-top { height: 170px; }
    .single-hero-body { padding: 20px; }
    .download-section { padding: 20px; }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 14px;
        --navbar-height: 56px;
        --bottom-nav-height: 60px;
    }
    .logo-text { font-size: 17px; }
    .logo-icon { width: 32px; height: 32px; font-size: 16px; }
    .btn { padding: 8px 14px; font-size: 13px; }
    .btn-primary { padding: 8px 16px; }
    .hero-top { margin-bottom: 20px; }
    .hero-main { grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
    .carousel-viewport { min-height: 200px; }
    .carousel-slide-icon { font-size: 40px; margin-bottom: 12px; }
    .carousel-slide-title { font-size: 17px; }
    .carousel-slide-desc { font-size: 12px; }
    .carousel-slide-content { padding: 16px; }
    .carousel-slide-label { font-size: 12px; padding: 4px 12px; }
    .carousel-dot { width: 8px; height: 8px; }
    .carousel-dot.active { width: 22px; }
    .hero-ranking { padding: 14px; }
    .ranking-header { margin-bottom: 14px; }
    .ranking-title { font-size: 15px; }
    .ranking-tab { padding: 5px 10px; font-size: 11px; }
    .ranking-item { padding: 8px 10px; gap: 10px; }
    .ranking-name { font-size: 13px; }
    .hero-badge { font-size: 12px; padding: 6px 14px; margin-bottom: 14px; }
    .hero-title { font-size: 22px; letter-spacing: -0.3px; margin-bottom: 10px; }
    .hero-subtitle { font-size: 13px; }
    .single-hero-top { height: 150px; }
    .single-hero-body { padding: 16px; }
    .single-hero-body h1 { font-size: 20px; }
    .single-hero-icon { font-size: 50px; }
    .categories-scroll { gap: 6px; padding: 10px 0; }
    .category-btn { padding: 7px 13px; font-size: 13px; gap: 5px; }
    .category-btn i { font-size: 13px; }
    .section-title { font-size: 20px; }
    .resources-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .card-image { height: 110px; }
    .card-image-icon { font-size: 32px; }
    .card-body { padding: 10px; }
    .card-title { font-size: 13px; }
    .card-desc { font-size: 11px; margin-bottom: 10px; }
    .card-tag { font-size: 10px; padding: 3px 8px; top: 8px; right: 8px; }
    .card-stats { font-size: 11px; gap: 8px; }
    .features { padding: 40px 0 60px; }
    .features-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
    .feature-card { padding: 14px 10px; }
    .feature-icon { width: 38px; height: 38px; font-size: 16px; margin-bottom: 10px; }
    .footer { padding: 40px 0 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 380px) {
    .resources-grid { grid-template-columns: 1fr; gap: 10px; }
    .card-image { height: 140px; }
    .card-image-icon { font-size: 40px; }
    .card-body { padding: 12px; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (pointer: coarse) {
    .category-btn, .btn, .bottom-nav-item, .sidebar-link, .hamburger {
        min-height: 44px;
        min-width: 44px;
    }

}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

@media print {
    .navbar, .categories, .mobile-bottom-nav,
    .mobile-search-overlay, .sidebar, .overlay,
    .load-more, .hero-glow {
        display: none !important;
    }
    body { background: white; color: black; }
    .hero { padding: 20px 0; }
    .resources-grid { gap: 12px; }
    .resource-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}

/* ========== 资讯列表页 & 文章详情页 ========== */
/* 样式已内联至 page-news.php 和 single.php 的 <style> 中，确保布局不受复杂 CSS 变量链影响 */

/* ========== 评论容器 ========== */
.blog-comments {
    margin-top: 32px;
    padding: 0;
}

/* ========== 评论区样式 ========== */
.comments-area {
    margin-top: 0;
}

/* ---- 评论标题 ---- */
.comments-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.comments-title::before {
    content: '\f086';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 20px;
    color: var(--accent-primary);
    opacity: 0.7;
}

/* ---- 评论列表 ---- */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 0;
}

/* 单条评论卡片 */
.comment-list .comment .comment-body {
    position: relative;
    padding: 24px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    overflow: hidden;
}
.comment-list .comment .comment-body:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
}

/* 子回复嵌套 */
.comment-list .children {
    list-style: none;
    margin: 0 0 0 40px;
    padding: 0;
    position: relative;
}
.comment-list .children::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    border-radius: 1px;
}
.comment-list .children .comment .comment-body {
    background: var(--bg-card-hover);
}

/* ---- 评论者信息 ---- */
.comment-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.comment-author .avatar {
    border-radius: var(--radius-full);
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    flex-shrink: 0;
}

.comment-author .fn {
    font-size: 15px;
    font-weight: 700;
    font-style: normal;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
/* 作者标记 */
.bypostauthor .comment-author .fn::after {
    content: '作者';
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--gradient-1);
    color: #fff;
    border-radius: var(--radius-sm);
    letter-spacing: 0.3px;
}

.comment-author .says {
    display: none;
}

/* ---- 评论时间 ---- */
.comment-metadata {
    margin-bottom: 12px;
    padding-left: 62px;
}

.comment-metadata a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.comment-metadata a::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 11px;
}

.comment-metadata a:hover {
    color: var(--accent-primary);
}

.comment-metadata .edit-link {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
}

.comment-metadata .edit-link a {
    color: var(--accent-primary);
    font-weight: 500;
}

/* ---- 评论正文 ---- */
.comment-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding-left: 62px;
}

.comment-content p {
    margin-bottom: 12px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* ---- 回复按钮 ---- */
.reply {
    margin-top: 14px;
    padding-left: 62px;
}

.reply .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    letter-spacing: 0.2px;
}
.reply .comment-reply-link::before {
    content: '\f3e5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
}

.reply .comment-reply-link:hover {
    border-color: var(--accent-primary);
    color: #fff;
    background: var(--accent-primary);
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* ---- 评论分页导航 ---- */
.comment-navigation {
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.comment-navigation a,
.comment-navigation .current {
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.comment-navigation a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 2px 10px var(--accent-glow);
    transform: translateY(-1px);
}

.comment-navigation .current {
    background: var(--gradient-1);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* ---- 评论回复表单 ---- */
.comment-respond {
    margin-top: 40px;
    padding: 32px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}


.comment-reply-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.comment-reply-title::before {
    content: '\f075';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-primary);
    font-size: 18px;
}

.comment-reply-title small {
    margin-left: auto;
}

.comment-reply-title small a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}
.comment-reply-title small a:hover {
    color: var(--error);
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.06);
}

.comment-notes {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
    padding: 10px 16px;
    background: var(--bg-card-hover);
    border-radius: var(--radius-md);
    line-height: 1.6;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-form label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-form .required {
    color: var(--error);
    font-size: 14px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    outline: none;
    resize: vertical;
    box-sizing: border-box;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--text-muted);
    box-shadow: none;
    background: var(--bg-card);
}

.comment-form textarea::placeholder,
.comment-form input::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.comment-form textarea {
    min-height: 130px;
    line-height: 1.7;
}

/* 未登录用户输入字段布局 */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    max-width: 420px;
}

.comment-form .form-submit {
    margin-top: 8px;
}

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--gradient-1);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px var(--accent-glow);
    letter-spacing: 0.3px;
}
.comment-form .submit::before {
    content: '\f1d8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
}

.comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.comment-form .submit:active {
    transform: scale(0.96);
}

/* ---- 已登录评论者 ---- */
.logged-in-as {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card-hover);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}
.logged-in-as::before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: var(--accent-primary);
}

.logged-in-as a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    margin: 0 2px;
    padding: 2px 8px;
    background: rgba(0, 102, 255, 0.08);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.logged-in-as a:hover {
    text-decoration: none;
    background: var(--accent-primary);
    color: #fff;
}

/* ---- 未审核评论提示 ---- */
.comment-awaiting-moderation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
    letter-spacing: 0.2px;
}
.comment-awaiting-moderation::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
}

/* ---- 评论关闭提示 ---- */
.no-comments {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-card-hover);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}
.no-comments::before {
    content: '\f4ad';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ---- 必须登录提示 ---- */
.must-log-in {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-card-hover);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}
.must-log-in a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}
.must-log-in a:hover {
    text-decoration: underline;
}

/* ---- 评论区空状态 ---- */
.comment-list:empty::after {
    content: '还没有评论，来做第一个评论的人吧~';
    display: block;
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-card-hover);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}

/* ---- 强制去除评论区所有蓝色装饰（覆盖缓存/内联样式） ---- */
.comments-title::after,
.comment-respond::before,
.comment-list .comment .comment-body::before {
    display: none !important;
    content: none !important;
    background: none !important;
    border: none !important;
}
.comment-notes {
    border-left: none !important;
}
.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--text-muted) !important;
    box-shadow: none !important;
}
.comment-list .comment .comment-body:hover {
    border-color: var(--border-light) !important;
    box-shadow: none !important;
}
.comment-list .children::before {
    background: var(--border-color) !important;
}
.comment-author .avatar {
    border-color: var(--border-color) !important;
    background: none !important;
    box-shadow: none !important;
}

/* ---- 移动端评论区适配 ---- */
@media (max-width: 768px) {
    .comments-title {
        font-size: 19px;
        margin-bottom: 20px;
    }

    .comment-respond {
        padding: 22px 18px;
        margin-top: 30px;
    }

    .comment-list .comment .comment-body {
        padding: 18px 16px;
        margin-bottom: 14px;
    }

    .comment-list .children {
        margin-left: 24px;
    }
    .comment-list .children::before {
        left: -12px;
    }

    .comment-author .avatar {
        width: 40px;
        height: 40px;
    }

    .comment-content,
    .comment-metadata,
    .reply {
        padding-left: 54px;
    }

    .comment-content {
        font-size: 14px;
        line-height: 1.7;
    }

    .comment-form .form-submit {
        display: flex;
    }
    .comment-form .submit {
        width: 100%;
        justify-content: center;
    }

    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        max-width: 100%;
    }
}
