/*
Theme Name: WallpaperHub Pro
Theme URI: https://plinthhd.com
Author: PlinthHD
Version: 5.0
License: GPL v2
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #080808;
    color: #f0f0f0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #080808; }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 20px; }

::selection { background: rgba(80,200,120,0.2); color: #fff; }

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes particleFade {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(0) translate(var(--x), var(--y)); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8,8,8,0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid #1a1a1a;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.site-logo a {
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    display: inline-flex;
    align-items: baseline;
    -webkit-tap-highlight-color: transparent;
}
.logo-text { color: #f0f0f0; }
.logo-hd { color: #50c878; font-weight: 900; }

.mobile-menu-toggle {
    display: flex;
    background: #181818;
    border: 1px solid #2a2a2a;
    color: #a0a0a0;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
}
.site-nav.active { display: flex; }

.nav-link {
    color: #a0a0a0;
    text-decoration: none;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
    text-align: center;
    background: #181818;
}

.search-form {
    display: flex;
    background: #181818;
    border-radius: 100px;
    border: 1px solid #2a2a2a;
    overflow: hidden;
}
.search-form input {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #f0f0f0;
    font-size: 12px;
    width: 100px;
    outline: none;
    font-family: inherit;
}
.search-form input::placeholder { color: #666; }
.search-btn {
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
}

/* ============ HERO ============ */
.hero-section { padding: 25px 14px 18px; text-align: center; }
.hero-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.hero-subtitle { font-size: 13px; color: #666; margin-bottom: 14px; }
.hero-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stat-number { font-size: 18px; font-weight: 700; }
.stat-label { font-size: 10px; color: #666; text-transform: uppercase; }

/* ============ CATEGORIES ============ */
.featured-categories { padding: 8px 14px 20px; }
.section-title { text-align: center; font-size: 15px; font-weight: 600; color: #a0a0a0; margin-bottom: 12px; }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.category-card {
    background: #181818;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    position: relative;
}
.category-thumb { width: 100%; aspect-ratio: 1/1.2; overflow: hidden; background: #0f0f0f; }
.category-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #666; font-size: 11px; }
.category-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    padding: 20px 6px 6px; text-align: center;
}
.category-label { font-size: 11px; font-weight: 700; color: #fff; display: block; }
.category-count { font-size: 8px; color: rgba(255,255,255,0.6); }
.category-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #50c878, #80e8a0, #50c878);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    z-index: 2;
}

/* ============ FILTER ============ */
.category-filter {
    padding: 10px 14px; display: flex; gap: 5px;
    overflow-x: auto; scrollbar-width: none;
}
.category-filter::-webkit-scrollbar { display: none; }
.cat-link {
    background: #181818; color: #a0a0a0; padding: 6px 12px;
    border-radius: 100px; text-decoration: none; font-size: 11px;
    white-space: nowrap; flex-shrink: 0; border: 1px solid transparent;
}
.cat-link.active { background: #1c1c1c; color: #f0f0f0; border-color: rgba(80,200,120,0.3); }

/* ============ GRID ============ */
.masonry-grid { columns: 2; column-gap: 6px; padding: 0 14px 20px; }

.wallpaper-card {
    break-inside: avoid; margin-bottom: 6px; border-radius: 8px;
    overflow: hidden; background: #181818; border: 1px solid #1e1e1e;
    display: inline-block; width: 100%;
}
.card-image-wrapper { line-height: 0; background: #0f0f0f; font-size: 0; }
.card-image-wrapper img { width: 100%; height: auto; display: block; margin: 0; padding: 0; }
.card-image-wrapper a { display: block; line-height: 0; font-size: 0; }
.card-overlay { display: none; }
.card-info { padding: 6px 8px; display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 10px; color: #a0a0a0; }
.card-badge { font-size: 8px; color: #666; background: #0f0f0f; padding: 1px 6px; border-radius: 100px; }

/* ============ SINGLE ============ */
.single-wallpaper { padding: 15px 12px; }
.single-header { text-align: center; margin-bottom: 14px; }
.single-header h1 { font-size: 18px; margin-bottom: 6px; }
.single-meta { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.meta-tag {
    background: #181818; color: #a0a0a0; padding: 3px 8px;
    border-radius: 100px; font-size: 10px; border: 1px solid #1e1e1e;
}
.image-showcase {
    border-radius: 10px; overflow: hidden; margin-bottom: 14px;
    border: 1px solid #1e1e1e; line-height: 0;
}
.image-showcase img { width: 100%; height: auto; display: block; }

/* ============ BREADCRUMBS ============ */
.breadcrumbs {
    padding: 5px 0 12px; font-size: 11px; color: #666;
    animation: fadeIn 0.3s ease;
}
.breadcrumbs a { color: #888; text-decoration: none; }
.breadcrumbs span { margin: 0 4px; }
.breadcrumbs .current { color: #a0a0a0; }

/* ============ DOWNLOAD ============ */
.download-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.download-btn {
    padding: 10px 18px; border-radius: 100px; text-decoration: none;
    font-weight: 600; font-size: 12px; text-align: center;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.download-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.download-btn.primary { background: #1c1c1c; color: #f0f0f0; border: 1px solid #2a2a2a; }
.download-btn.secondary { background: transparent; color: #a0a0a0; border: 1px solid #1e1e1e; }

/* ============ CONTENT ============ */
.wallpaper-content { color: #a0a0a0; line-height: 1.7; font-size: 13px; margin-top: 20px; padding: 0 4px; }

/* ============ TAGS ============ */
.post-tags {
    max-width: 100%; margin: 20px 0 0; display: flex;
    gap: 6px; flex-wrap: wrap; align-items: center; padding: 0 4px;
}
.tags-label { font-size: 11px; color: #666; font-weight: 600; }
.tag-link {
    background: #181818; color: #888; padding: 4px 10px;
    border-radius: 100px; font-size: 10px; text-decoration: none;
    border: 1px solid #1e1e1e;
}

/* ============ SHARE ============ */
.share-section {
    max-width: 100%; margin: 15px 0; display: flex;
    gap: 8px; align-items: center; flex-wrap: wrap;
    padding: 12px 0; border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a;
}
.share-label { font-size: 11px; color: #666; font-weight: 600; }
.share-link {
    background: #181818; color: #888; padding: 5px 12px;
    border-radius: 100px; font-size: 10px; text-decoration: none;
    border: 1px solid #1e1e1e;
}

/* ============ RELATED ============ */
.related-section { margin-top: 30px; padding-top: 15px; border-top: 1px solid #1a1a1a; }
.related-section h3 { text-align: center; margin-bottom: 14px; font-size: 14px; color: #a0a0a0; font-weight: 600; }
.related-grid { columns: 2; column-gap: 6px; padding: 0; }
.related-card { margin-bottom: 6px; }

/* ============ PAGINATION ============ */
.pagination-wrapper { padding: 18px 14px; text-align: center; }
.pagination { display: inline-flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.page-numbers {
    min-width: 30px; height: 30px; padding: 0 8px;
    background: #181818; color: #a0a0a0; text-decoration: none;
    border-radius: 100px; font-size: 11px;
    display: inline-flex; align-items: center; justify-content: center;
}
.page-numbers.current { background: #1c1c1c; color: #f0f0f0; }

/* ============ FOOTER ============ */
.site-footer {
    background: #0f0f0f; border-top: 1px solid #1e1e1e;
    padding: 22px 14px 18px; margin-top: 25px; text-align: center;
}
.footer-grid { display: flex; flex-direction: column; gap: 18px; margin-bottom: 16px; }
.footer-col h4 { font-size: 11px; margin-bottom: 6px; text-transform: uppercase; }
.footer-col p { font-size: 11px; color: #666; }
.footer-col a { display: block; color: #666; text-decoration: none; font-size: 11px; padding: 2px 0; }
.footer-bottom { padding-top: 12px; border-top: 1px solid #1e1e1e; color: #666; font-size: 10px; }

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed; bottom: 14px; right: 10px;
    width: 36px; height: 36px; background: #181818;
    border: 1px solid #2a2a2a; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 999; opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    text-decoration: none; color: #a0a0a0; font-size: 14px; font-weight: bold;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* ============ PARTICLES ============ */
.cursor-glow { display: none; }
.glow-particle { display: none; }

/* ==================== DESKTOP ==================== */
@media (min-width: 769px) {
    .cursor-glow { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; overflow: hidden; }
    .glow-particle {
        display: block; position: absolute; border-radius: 50%;
        background: rgba(120,240,160,0.5);
        animation: particleFade 0.9s ease-out forwards;
        box-shadow: 0 0 6px rgba(120,240,160,0.3);
    }
    
    .site-header { padding: 14px 44px; flex-wrap: nowrap; transition: padding 0.3s ease, box-shadow 0.3s ease; }
    .site-header.scrolled { padding: 8px 44px; box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
    
    .mobile-menu-toggle { display: none; }
    .site-nav { display: flex !important; flex-direction: row; width: auto; padding: 0; gap: 2px; }
    .nav-link {
        padding: 8px 16px; font-size: 13.5px; text-align: left;
        background: transparent; border-radius: 100px; transition: all 0.2s ease;
    }
    .nav-link:hover { background: rgba(255,255,255,0.04); color: #fff; }
    
    .search-form { transition: border-color 0.3s, box-shadow 0.3s; }
    .search-form input { width: 160px; font-size: 13px; transition: width 0.3s ease; }
    .search-form input:focus { width: 240px; }
    .search-form:focus-within { border-color: rgba(80,200,120,0.25); box-shadow: 0 0 15px rgba(80,200,120,0.04); }
    .search-btn { transition: color 0.2s; }
    .search-btn:hover { color: #50c878; }
    
    .hero-section { padding: 60px 44px 30px; }
    .hero-title { font-size: 44px; letter-spacing: -1.5px; }
    .hero-subtitle { font-size: 16px; max-width: 500px; margin: 0 auto 16px; }
    .stat-number { font-size: 28px; }
    
    .featured-categories { padding: 15px 44px 40px; }
    .section-title { font-size: 20px; margin-bottom: 20px; }
    .categories-grid { grid-template-columns: repeat(5, 1fr); max-width: 1200px; margin: 0 auto; gap: 16px; }
    .category-card { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
    .category-thumb { aspect-ratio: 4/5; }
    .category-thumb img { transition: transform 0.5s ease; }
    .category-label { font-size: 15px; transition: color 0.3s; }
    .category-count { font-size: 10px; transition: all 0.3s; }
    .category-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.6); border-color: rgba(80,200,120,0.2); }
    .category-card:hover .category-thumb img { transform: scale(1.08); }
    .category-card:hover .category-label { color: #50c878; }
    .category-card:hover .category-count { background: rgba(80,200,120,0.1); color: #80e8a0; }
    
    .category-filter { padding: 18px 44px; flex-wrap: wrap; overflow-x: visible; }
    .cat-link { font-size: 13px; padding: 8px 20px; transition: all 0.3s ease; }
    .cat-link:hover { color: #fff; border-color: #2a2a2a; transform: translateY(-2px); }
    
    .masonry-grid { columns: 4; column-gap: 14px; padding: 0 44px 30px; }
    .wallpaper-card { margin-bottom: 14px; border-radius: 14px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
    .wallpaper-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.6); border-color: rgba(80,200,120,0.18); z-index: 5; }
    .card-image-wrapper img { transition: transform 0.5s ease; }
    .wallpaper-card:hover .card-image-wrapper img { transform: scale(1.05); }
    .card-title { font-size: 12px; }
    .card-badge { font-size: 10px; }
    
    .card-overlay {
        display: flex; position: absolute; inset: 0;
        background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.9) 100%);
        opacity: 0; transition: opacity 0.3s ease;
        flex-direction: column; justify-content: flex-end; padding: 20px; pointer-events: none;
    }
    .wallpaper-card:hover .card-overlay { opacity: 1; }
    .overlay-actions { display: flex; gap: 8px; pointer-events: all; transform: translateY(8px); opacity: 0; transition: all 0.3s ease; }
    .wallpaper-card:hover .overlay-actions { transform: translateY(0); opacity: 1; }
    .overlay-btn {
        padding: 9px 16px; border-radius: 100px; font-size: 12px; font-weight: 600;
        background: rgba(255,255,255,0.12); color: #fff;
        border: 1px solid rgba(255,255,255,0.1);
        backdrop-filter: blur(10px); text-decoration: none;
        transition: all 0.2s ease; display: flex; align-items: center; gap: 5px;
    }
    .overlay-btn:hover { background: rgba(255,255,255,0.2); }
    
    .single-wallpaper { padding: 25px 44px; max-width: 1200px; margin: 0 auto; }
    .single-header h1 { font-size: 26px; }
    .breadcrumbs { font-size: 12px; }
    .wallpaper-content { font-size: 14px; max-width: 800px; margin-left: auto; margin-right: auto; }
    .post-tags, .share-section { max-width: 800px; margin-left: auto; margin-right: auto; }
    
    .download-btn { font-size: 14px; padding: 12px 26px; transition: all 0.3s ease; }
    .download-btn svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
    .download-btn:hover { transform: translateY(-2px); }
    .download-btn:hover svg { transform: translateY(-2px); }
    .download-btn.primary:hover { border-color: rgba(80,200,120,0.25); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
    .download-btn.secondary:hover { border-color: #3a3a3a; color: #fff; }
    
    .meta-tag { transition: all 0.2s ease; }
    .meta-tag:hover { border-color: #3a3a3a; color: #fff; }
    .tag-link { transition: all 0.2s; }
    .tag-link:hover { color: #50c878; border-color: rgba(80,200,120,0.2); }
    .share-link { transition: all 0.2s; }
    .share-link:hover { color: #fff; border-color: #3a3a3a; }
    
    .related-section { margin-top: 40px; }
    .related-section h3 { font-size: 17px; }
    .related-grid { columns: 4; column-gap: 14px; }
    .related-card { margin-bottom: 14px; }
    
    .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; text-align: left; max-width: 1200px; margin: 0 auto 25px; }
    .footer-col a { transition: color 0.2s, transform 0.2s; }
    .footer-col a:hover { color: #50c878; transform: translateX(4px); }
    
    .page-numbers { transition: all 0.2s ease; }
    .page-numbers:hover { background: #222; color: #fff; transform: translateY(-1px); }
    
    .back-to-top { bottom: 28px; right: 28px; width: 44px; height: 44px; font-size: 16px; transition: all 0.3s ease, opacity 0.3s, visibility 0.3s; }
    .back-to-top:hover { border-color: rgba(80,200,120,0.3); color: #50c878; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
    
    .site-logo a { transition: transform 0.3s ease; position: relative; }
    .site-logo a:hover { transform: scale(1.04); }
    .site-logo a:hover .logo-text { color: #50c878; }
    .site-logo a:hover .logo-hd { color: #f0f0f0; }
    .logo-text, .logo-hd { transition: color 0.3s ease; }
    
    .site-logo a::after {
        content: ''; position: absolute; bottom: -3px; left: 0;
        width: 0; height: 1.5px;
        background: linear-gradient(90deg, #50c878, #80e8a0, #50c878);
        background-size: 200% 100%;
        animation: gradientShift 3s ease infinite;
        transition: width 0.3s ease; border-radius: 10px;
    }
    .site-logo a:hover::after { width: 100%; }
}