/* ===== CSS变量定义 ===== */
:root {
    --primary-color: #64b5f6;
    --primary-rgb: 100, 181, 246;
    --primary-hover: #42a5f5;
    --primary-hover-rgb: 66, 165, 245;
    --secondary-color: #42a5f5;
    --secondary-rgb: 66, 165, 245;
    --success-color: #10b981;
    --success-rgb: 16, 185, 129;
    --info-color: #06b6d4;
    --info-rgb: 6, 182, 212;
    --warning-color: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --danger-color: #ef4444;
    --danger-rgb: 239, 68, 68;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --backdrop-blur: blur(16px);
}

/* ===== 基础样式 ===== */
body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
}

/* ===== 玻璃态按钮样式 ===== */
.btn {
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border-radius: 12px;
}

.btn-primary {
    background: rgba(var(--primary-rgb), 0.9);
    color: white;
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(var(--primary-hover-rgb), 0.4);
}

.btn-outline-primary {
    background: var(--glass-bg);
    color: var(--primary-color);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.btn-outline-primary:hover {
    background: rgba(var(--primary-hover-rgb), 0.1);
    color: var(--primary-hover);
    transform: translateY(-1px);
    border-color: var(--primary-hover);
}

.btn-success {
    background: rgba(var(--success-rgb), 0.9);
    border-color: rgba(var(--success-rgb), 0.3);
    box-shadow: 0 8px 32px rgba(var(--success-rgb), 0.3);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(5, 150, 105, 0.4);
}

.btn-outline-secondary {
    background: var(--glass-bg);
    color: var(--secondary-color);
    border-color: rgba(var(--secondary-rgb), 0.3);
}

.btn-outline-secondary:hover {
    background: rgba(var(--secondary-rgb), 0.1);
    color: var(--secondary-color);
}

/* ===== 玻璃态输入框 ===== */
.form-control {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.4);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-hover-rgb), 0.15);
}

.form-control::placeholder {
    color: rgba(var(--dark-color), 0.6);
}

/* ===== 玻璃态卡片 ===== */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 16px 16px 0 0 !important;
}

/* ===== 玻璃态导航栏 ===== */
.navbar-custom {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--glass-border);
}

/* ===== 玻璃态分页 ===== */
.pagination .page-link {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    color: var(--primary-color);
    border-radius: 10px;
    margin: 0 3px;
}

.pagination .page-link:hover {
    background: rgba(var(--primary-hover-rgb), 0.1);
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

.pagination .page-item.active .page-link {
        color:#fff;
    background: rgba(var(--primary-rgb), 0.9);
    border-color: rgba(var(--primary-rgb), 0.3);
}

/* ===== 玻璃态徽章 ===== */
.badge {
    backdrop-filter: var(--backdrop-blur);
    border-radius: 8px;
}

/* ===== 玻璃态面包屑 ===== */
.breadcrumb {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

/* ===== 精选壁纸大图样式 ===== */
.featured-wallpaper {
    position: relative;
    height: 600px;
    overflow: hidden;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    margin-bottom: 3rem;
}

.featured-wallpaper:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.featured-wallpaper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.featured-wallpaper:hover img {
    transform: scale(1.05);
}

.featured-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    padding: 3rem 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.featured-left {
    flex: 1;
}

.featured-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.featured-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.featured-author {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    max-width: 320px;
    line-height: 1.3;
}

/* ===== 自定义导航栏 ===== */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: var(--light-color);
    color: var(--primary-hover) !important;
}

/* ===== 英雄区域背景 ===== */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ===== 搜索框样式 ===== */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-btn {
    border-radius: 50px;
    padding: 15px 30px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== 卡片样式 ===== */
.wallpaper-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.wallpaper-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.wallpaper-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wallpaper-card:hover .wallpaper-image {
    transform: scale(1.05);
}

.wallpaper-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.wallpaper-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.wallpaper-date {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ===== 页脚样式 ===== */
.footer {
    background-color: var(--light-color);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 3rem 0 2rem;
}

/* ===== 分页样式 ===== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: var(--primary-hover);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== 统计信息 ===== */
.stats-item {
    text-align: center;
    color: white;
}

.stats-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== 详情页样式 ===== */
.wallpaper-detail-image {
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.meta-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.download-btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-card {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 1.5rem;
    border: none;
}

/* ===== 壁纸详情页专用样式 ===== */
.wallpaper-hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.wallpaper-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.wallpaper-info {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    z-index: 1;
    color: white;
}

.wallpaper-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.wallpaper-meta {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.wallpaper-author {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.download-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.download-title {
    color: var(--dark-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.download-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    color: var(--dark-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: rgba(var(--primary-hover-rgb), 0.1);
    color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-hover);
}

.download-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.download-btn.primary:hover {
    background: var(--primary-hover);
    color: white;
}

/* ===== 相关推荐卡片样式 ===== */
.related-wallpaper-card {
    position: relative;
    height: 360px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    display: block;
    transform-origin: center;
}

.related-wallpaper-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.related-wallpaper-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    z-index: 1;
}

.related-wallpaper-card:hover::before {
    transform: scale(1.1);
}

.related-wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
    transition: opacity 0.3s ease;
}

.related-wallpaper-card:hover .related-wallpaper-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.2) 30%,
        rgba(0, 0, 0, 0.5) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.related-wallpaper-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: white;
    z-index: 3;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.related-wallpaper-card:hover .related-wallpaper-content {
    transform: translateY(-8px);
}

.related-wallpaper-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-wallpaper-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.related-wallpaper-date i {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ===== 相关推荐区域标题样式 ===== */
.related-section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.related-section-title h3 {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.related-section-title p {
    color: var(--secondary-color);
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

.related-section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===== 响应式样式 ===== */
@media (max-width: 768px) {
    .featured-wallpaper {
        height: 400px;
        margin-bottom: 2rem;
        border-radius: 20px;
    }
    
    .featured-info {
        padding: 2rem 1.5rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .featured-title {
        font-size: 1.1rem;
    }
    
    .featured-author {
        text-align: left;
        max-width: none;
        font-size: 0.85rem;
    }

    .hero-section {
        min-height: 60vh;
    }
    
    .wallpaper-image {
        height: 200px;
    }
    
    .stats-number {
        font-size: 2rem;
    }

    .wallpaper-title {
        font-size: 1.25rem;
    }
    
    .wallpaper-info {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }

    .related-wallpaper-card {
        height: 300px;
        border-radius: 16px;
    }

    .related-wallpaper-content {
        padding: 1.5rem;
    }

    .related-wallpaper-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .related-wallpaper-date {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .related-section-title h3 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .related-wallpaper-card {
        height: 260px;
        border-radius: 14px;
    }

    .related-wallpaper-content {
        padding: 1.25rem;
    }

    .related-wallpaper-card:hover .related-wallpaper-content {
        transform: translateY(-5px);
    }

    .related-wallpaper-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .related-wallpaper-date {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    .related-section-title h3 {
        font-size: 1.5rem;
    }
}