/* ============================================
   必应壁纸 - 现代简约风格 UI
   ============================================ */

/* ========== 字体导入 ========== */
@import url('https://fonts.googleapis.com/css2?family=Alibaba_Sans_SC:wght@400;500;600;700;800&display=swap');

/* ========== CSS 变量 ========== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --font-sans: 'Alibaba Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 深色模式主题 */
:root.dark-mode {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #06b6d4;
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #ffffff;
}

/* ========== 重置样式 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== 容器 ========== */
.container {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ========== 头部导航 ========== */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav a {
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: var(--radius);
}

.nav a:hover {
    color: var(--primary);
}

.nav a:hover::before {
    opacity: 0.08;
}

.nav a.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.5);
}

.nav a.active::before {
    display: none;
}

/* ========== Hero 区域 ========== */
.hero {
    position: relative;
    height: 75vh;
    min-height: 550px;
    max-height: 900px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
    color: white;
    max-width: 900px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-date {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.hero-copyright {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ========== 月份导航 ========== */
.archive-nav {
    background: white;
    padding: 32px 0;
    border-bottom: 1px solid var(--gray-100);
}

.archive-nav h3 {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.month-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.month-links a {
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
}

.month-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.month-links a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
}

.month-links a.more {
    background: transparent;
    color: var(--primary);
    font-weight: 600;
}

/* ========== 壁纸网格 ========== */
.recent-section {
    padding: 60px 0;
}

.archive-main {
    padding: 0 0 60px 0;
}

.archive-main > .container {
    padding-top: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.wallpaper-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.wallpaper-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.wallpaper-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.wallpaper-card:hover::before {
    opacity: 1;
}

.wallpaper-card a {
    display: block;
}

.card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallpaper-card:hover .card-image img {
    transform: scale(1.08);
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.wallpaper-card:hover .card-image::after {
    opacity: 1;
}

.card-info {
    padding: 20px;
}

.card-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 50px;
    background: var(--gray-100);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
}

.card-tag:hover {
    background: var(--primary);
    color: white;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    position: relative;
    z-index: 10;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: white;
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
    text-decoration: none;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.action-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

.action-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-btn[data-action="like"]:hover,
.action-btn[data-action="like"].active {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.action-btn[data-action="like"].active {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.action-btn[data-action="like"].active svg {
    fill: currentColor;
}

.action-btn[data-action="favorite"]:hover,
.action-btn[data-action="favorite"].active {
    background: #fef3c7;
    color: #d97706;
    border-color: #fcd34d;
}

.action-btn[data-action="favorite"].active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.action-btn[data-action="favorite"].active svg {
    fill: currentColor;
}

.action-btn[data-action="share"]:hover {
    background: #dbeafe;
    color: #2563eb;
    border-color: #93c5fd;
}

.view-more {
    text-align: center;
    margin-top: 50px;
}

/* ========== 归档页面 ========== */
.archive-header {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 80px 24px;
    color: white;
    margin-bottom: 40px;
}

.archive-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.archive-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.archive-header p strong {
    font-weight: 700;
}

.filter-section {
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.filter-group select {
    padding: 12px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.filter-form .btn {
    padding: 12px 24px;
}

.month-nav {
    margin-bottom: 40px;
}

.month-nav .month-links {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    max-height: 220px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.archive-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    color: var(--gray-500);
    font-size: 0.95rem;
}

.archive-stats strong {
    color: var(--primary);
    font-weight: 700;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-btn,
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: all 0.2s;
}

.page-btn:hover,
.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-btn.active,
.page-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.4);
}

.page-ellipsis {
    color: var(--gray-400);
    padding: 0 8px;
    font-weight: 600;
}

.no-data {
    text-align: center;
    padding: 100px 20px;
    color: var(--gray-500);
}

.no-data h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--gray-700);
}

/* ========== 详情页面 ========== */
.detail-main {
    min-height: calc(100vh - 72px);
}

.detail-page {
    min-height: 100vh;
}

.detail-hero {
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: flex-end;
    max-width: 1700px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 32px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin-top: 20px; /* 在大图和顶部之间加入距离 */
}

.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    display: none;
}

/* 详情页文字内容 */
.detail-info-hero {
    background: transparent; /* 设置为透明背景 */
    padding: 50px 0;
}

.detail-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    color: var(--gray-800);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.detail-date {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
    line-height: 1.4;
}

.detail-copyright {
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 0;
}

.detail-info {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.detail-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.detail-actions .btn {
    flex: 1;
    min-width: 200px;
    padding: 16px 28px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 24px;
    padding: 8px 0;
}

.back-link:hover {
    gap: 12px;
}

/* 详情页内容区域 */
.detail-content {
    padding: 50px 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 100%;
}

/* 详情页一个卡片样式 */
.detail-card {
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.detail-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 32px 32px 20px;
    border-bottom: 2px solid var(--gray-100);
}

.card-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-800);
    margin: 0 0 8px 0;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 0;
}

.card-body {
    padding: 32px;
}

/* 下载区域特定样式 */
.download-card .card-body {
    padding: 28px 32px;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.download-option {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f0f9ff 0%, #f5fbff 100%);
    border: 2px solid #d0e8f2;
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.download-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.download-option:hover {
    transform: translateY(-4px);
    border-color: #10b981;
    box-shadow: 0 12px 32px -3px rgba(16, 185, 129, 0.2);
}

.download-option:hover::before {
    opacity: 1;
}

.download-option.4k-option {
    background: linear-gradient(135deg, #fef3f2 0%, #fef9f8 100%);
    border-color: #f4ddd8;
}

.download-option.4k-option:hover {
    border-color: #ef4444;
    box-shadow: 0 12px 32px -3px rgba(239, 68, 68, 0.2);
}

.option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.option-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.option-content {
    flex: 1;
    margin-bottom: 16px;
}

.resolution {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.size-info {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.option-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.download-text {
    font-weight: 700;
    color: #10b981;
    font-size: 0.95rem;
}

.download-option.4k-option .download-text {
    color: #ef4444;
}

/* 信息区域特定样式 */
.info-card .card-header {
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

.info-card .card-header h3 {
    margin-bottom: 0;
    color: var(--gray-800);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-item-row {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    gap: 32px;
}

.info-item-row:last-child {
    border-bottom: none;
}

.info-label {
    min-width: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.info-text {
    font-size: 1rem;
    color: var(--gray-800);
    flex: 1;
    line-height: 1.6;
    word-break: break-word;
}

/* 导航按钮 */
.nav-section {
    margin-top: 40px;
}

.nav-buttons {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    flex: 1;
}

.nav-btn:hover:not(.disabled) {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.nav-prev {
    justify-content: flex-start;
}

.nav-btn.nav-next {
    justify-content: flex-end;
    text-align: right;
}

.nav-btn.nav-archive {
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.5);
}

.nav-btn.nav-archive:hover {
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.6);
}

.nav-arrow {
    font-size: 1.8rem;
    color: var(--primary);
}

.nav-text small {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.nav-text strong {
    color: var(--gray-700);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.3rem;
}

/* 404页面 */
.not-found {
    text-align: center;
    padding: 100px 20px;
}

.not-found h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--gray-700);
}

.not-found p {
    color: var(--gray-500);
    margin-bottom: 32px;
}

.not-found-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ========== 底部 ========== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.footer a {
    color: var(--accent);
    font-weight: 500;
}

.footer a:hover {
    color: white;
}

.footer p {
    font-size: 0.95rem;
    margin: 8px 0;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
        padding: 0 28px;
    }
    
    .wallpaper-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 24px;
    }
    
    .wallpaper-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header .container {
        height: auto;
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
    }

    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav a {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .hero {
        height: 60vh;
        min-height: 450px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-content {
        padding: 30px 20px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .wallpaper-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }

    .archive-header {
        padding: 60px 16px;
    }

    .archive-header h2 {
        font-size: 1.8rem;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .detail-info {
        margin: -60px 16px 40px;
        padding: 28px;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-hero-content {
        padding: 30px 20px;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .detail-content {
        padding: 30px 0;
    }

    .download-section,
    .info-section {
        padding: 24px;
    }

    .download-buttons {
        flex-direction: column;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .nav-btn.nav-archive {
        order: -1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .hero {
        height: 55vh;
        min-height: 380px;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-date {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .wallpaper-grid {
        grid-template-columns: 1fr;
    }

    .card-info {
        padding: 16px;
    }

    .pagination {
        gap: 6px;
    }

    .page-btn,
    .page-link {
        min-width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }

    .recent-section,
    .archive-main {
        padding: 40px 0;
    }
}

/* ========== 加载动画 ========== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--gray-500);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 图片占位动画 ========== */
.card-image img[loading="lazy"] {
    background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ========== 选中样式 ========== */
::selection {
    background: var(--primary);
    color: white;
}

/* ========== 收藏页面 ========== */
.favorites-page {
    padding: 40px 0 80px;
    min-height: 60vh;
}

.favorites-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 0;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn svg {
    width: 20px;
    height: 20px;
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn.active svg {
    color: var(--primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .favorites-tabs {
        gap: 8px;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .tab-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ========== 分享菜单 ========== */
.share-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.share-menu-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.share-menu-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    text-align: center;
}

.share-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--gray-50);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.share-icon {
    font-size: 1.5rem;
}

.share-btn span:last-child {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* 分享模态框 */
.share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.share-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    min-width: 300px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    line-height: 1;
}

.share-modal-close:hover {
    color: var(--gray-700);
}

.share-modal-body {
    padding: 20px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gray-800);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10002;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 导航下方特色壁纸 ========== */
.featured-section {
    background: transparent; /* 设置为透明背景 */
    padding: 40px 0;
    border-bottom: none; /* 移除底部边框 */
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.featured-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card:hover .featured-image img {
    transform: scale(1.08);
}

.featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-card:hover .featured-image::after {
    opacity: 1;
}

.featured-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
}

.featured-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 3px 10px;
    border-radius: 50px;
    align-self: flex-start;
}

@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .featured-section {
        padding: 30px 0;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .featured-image {
        aspect-ratio: 16 / 10;
    }
    
    .featured-info {
        padding: 12px;
    }
    
    .featured-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .featured-date {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .featured-section {
        padding: 20px 0;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .featured-card {
        display: flex;
        flex-direction: row;
        min-height: 140px;
    }
    
    .featured-link {
        flex-direction: row;
    }
    
    .featured-image {
        width: 120px;
        min-width: 120px;
        aspect-ratio: 1;
    }
    
    .featured-info {
        padding: 12px;
    }
    
    .featured-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

/* ========== 随机标签预览 ========== */
.random-tags-section {
    margin-top: 60px;
    text-align: center;
}

.random-tags-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 30px;
    position: relative;
}

.random-tags-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 20px 0;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tag-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tag-item:hover::before {
    opacity: 0.1;
}

.tag-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.1);
}

.tag-item span {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .tags-container {
        gap: 12px;
        padding: 15px 0;
    }
    
    .tag-item {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .random-tags-section h3 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .tags-container {
        gap: 10px;
    }
    
    .tag-item {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
    
    .share-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 详情页面响应式样式 */
@media (max-width: 768px) {
    .detail-hero {
        padding: 0 20px;
    }
    
    .detail-info-hero {
        padding: 30px 0;
    }
    
    .detail-hero-content {
        padding: 0 15px;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .detail-content {
        padding: 30px 0;
    }
    
    .detail-card {
        margin-bottom: 24px;
    }
    
    .card-header {
        padding: 24px 24px 16px;
    }
    
    .card-header h3 {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 24px;
    }
    
    .download-options {
        grid-template-columns: 1fr;
    }
    
    .info-item-row {
        padding: 12px 0;
        gap: 24px;
    }
    
    .info-label {
        min-width: 90px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .detail-hero {
        padding: 0 16px;
    }
    
    .detail-info-hero {
        padding: 20px 0;
    }
    
    .detail-title {
        font-size: 1.2rem;
    }
    
    .detail-date {
        font-size: 0.8rem;
        padding: 6px 16px;
    }
    
    .detail-copyright {
        font-size: 0.9rem;
    }
    
    .detail-content {
        padding: 20px 0;
    }
    
    .detail-card {
        margin-bottom: 20px;
        border-radius: var(--radius);
    }
    
    .card-header {
        padding: 20px 16px 12px;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .card-desc {
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 20px 16px;
    }
    
    .download-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .download-option {
        padding: 16px;
    }
    
    .option-label {
        font-size: 1rem;
    }
    
    .resolution {
        font-size: 1.1rem;
    }
    
    .info-item-row {
        padding: 12px 0;
        gap: 16px;
        flex-direction: column;
    }
    
    .info-label {
        min-width: auto;
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .info-text {
        font-size: 0.95rem;
    }
}

/* ========== 搜索功能样式 ========== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--gray-700);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--gray-400);
}

.search-bar button {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.search-bar button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========== 全屏预览样式 ========== */
.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.fullscreen-viewer.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.fullscreen-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    background: rgba(0, 0, 0, 0.6);
    padding: 16px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.fullscreen-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.fullscreen-btn.close {
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: auto;
}

.fullscreen-info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    max-width: 400px;
}

.fullscreen-info h3 {
    font-size: 1.25rem;
    margin: 0 0 8px 0;
}

.fullscreen-info p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* ========== 键盘快捷键提示 ========== */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== 增强下载选项样式 ========== */
.download-option {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.option-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.download-text {
    display: block;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.9rem;
}

/* 多尺寸选项 */
.resolution {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.size-info {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-500);
}
