/* =========================================
   1. RESET & CORE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

/* =========================================
   2. AD SLOTS (Monetization)
   ========================================= */
.ad-container {
    display: flex;
    justify-content: center;
    padding: 15px 5%;
    background: #fff;
}

.ad-placeholder {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: #f0f0f0;
    border: 1px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   3. NAVIGATION (Responsive Menu)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 70px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar ul li a {
    padding: 10px 15px;
    color: #444;
    font-weight: 500;
}

.navbar ul li a:hover {
    color: #000;
}

#click { display: none; }

.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
}

/* =========================================
   4. HERO & CATEGORIES
   ========================================= */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #111;
}

.hero p {
    color: #666;
}

.categories {
    padding: 15px 5%;
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    white-space: nowrap;
    position: sticky;
    top: 70px; /* Sits right under nav */
    z-index: 999;
}

.categories::-webkit-scrollbar { display: none; }

.category-wrapper {
    display: flex;
    gap: 10px;
}

.chip {
    padding: 8px 20px;
    background: #f0f0f0;
    border-radius: 20px;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
}

.chip.active, .chip:hover {
    background: #000;
    color: #fff;
}

/* =========================================
   5. WALLPAPER GRID (The Core)
   ========================================= */
.grid-container {
    display: grid;
    /* Responsive columns: Adjusts based on screen size */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px 5%;
}

.card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ddd;
    /* Forces consistent mobile aspect ratio regardless of wall.jpg height */
    aspect-ratio: 9 / 16; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Magic: crops image to fill the box without distortion */
    display: block;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.08);
}

/* Overlay Info */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 4px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.card-details {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card:hover .card-details {
    opacity: 1;
}

.card-tags {
    font-size: 0.75rem;
    color: #ddd;
}

.view-text {
    background: #fff;
    color: #000;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Native Ad Card */
.ad-card {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.ad-label {
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    background: #f0f0f0;
    font-size: 0.6rem;
    color: #999;
}

/* =========================================
   6. PAGINATION
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    gap: 8px;
}

.pagination a, .pagination .page {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #333;
    font-weight: 600;
}

.pagination a.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* =========================================
   7. FOOTER (3-Column)
   ========================================= */
.footer {
    background: #fff;
    padding: 60px 5% 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    border-top: 1px solid #eee;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #666; }
.footer-col ul li a:hover { color: #000; }

/* =========================================
   8. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .menu-btn { display: block; }
    
    .navbar ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: 0.4s;
    }

    #click:checked ~ ul {
        left: 0;
    }

    .navbar ul li {
        margin: 15px 0;
    }

    .hero h1 { font-size: 1.8rem; }
    
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 Wallpapers per row on mobile */
        gap: 10px;
        padding: 15px;
    }

    .footer {
        text-align: center;
    }
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5%;
}

.single-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px; /* Main content + Sidebar */
    gap: 40px;
    align-items: start;
}

/* Breadcrumbs */
.breadcrumb { font-size: 0.85rem; color: #888; margin-bottom: 15px; }
.breadcrumb a { color: #3498db; }

/* Main Content */
.wp-title { font-size: 2rem; margin-bottom: 20px; color: #111; }

.preview-box {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.preview-box img {
    max-width: 100%;
    max-height: 85vh; /* Prevents vertical scrolling for the image */
    display: block;
    margin: 0 auto;
}

/* Action Area */
.action-bar {
    background: #fff;
    padding: 25px;
    margin-top: -10px;
    border-radius: 0 0 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    border-top: none;
}

.wp-meta { display: flex; flex-direction: column; gap: 5px; font-size: 0.9rem; }

.download-btn {
    background: #000;
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
}

.download-btn:hover { background: #333; transform: scale(1.05); }

/* Tags Section */
.tag-section { margin-top: 30px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tag-cloud a { background: #eee; padding: 6px 15px; border-radius: 5px; font-size: 0.85rem; color: #444; }

/* Sidebar Widgets */
.sidebar { position: sticky; top: 90px; } /* Sticks the sidebar while scrolling */

.sidebar-widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.sidebar-widget h4 { margin-bottom: 15px; border-bottom: 2px solid #f8f8f8; padding-bottom: 8px; }

.widget-list { list-style: none; }
.widget-list li { padding: 10px 0; border-bottom: 1px solid #f9f9f9; }
.widget-list li a { color: #555; font-size: 0.95rem; }

/* Related Grid in Sidebar */
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-grid img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 6px; }

/* Responsive Single Page */
@media (max-width: 900px) {
    .single-wrapper { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .action-bar { flex-direction: column; gap: 20px; text-align: center; }
    .wp-title { font-size: 1.5rem; }
}
/* Archive Header Styles */
.archive-header {
    padding: 40px 0 20px;
    background: #fff;
    text-align: left;
}

.archive-header h1 {
    font-size: 2.5rem;
    color: #111;
    margin: 10px 0;
    font-weight: 800;
}

.archive-header p {
    max-width: 800px;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Category Page Specific Adjustments */
@media (max-width: 768px) {
    .archive-header {
        text-align: center;
        padding: 30px 20px;
    }
    .archive-header h1 {
        font-size: 1.8rem;
    }
    .archive-header p {
        font-size: 0.9rem;
    }
}
/* Specific Grid for Desktop Wallpapers */
.desktop-grid {
    /* Desktop cards are wider, so we use a larger min-width */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.desktop-card {
    /* Magic Ratio for Widescreen (16:9) */
    aspect-ratio: 16 / 9 !important; 
}

/* Ensure the hover and details work the same */
.desktop-card img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Responsive adjustment for desktop wallpapers on mobile phones */
@media (max-width: 600px) {
    .desktop-grid {
        /* On small phones, show 1 large widescreen card per row */
        grid-template-columns: 1fr;
    }
    
    .desktop-card {
        aspect-ratio: 16 / 9 !important;
    }
}
/* Specific Layout for Desktop Wallpaper Single Page */
.desktop-layout {
    grid-template-columns: 1fr 320px;
}

/* Widescreen Preview Box */
.desktop-preview {
    aspect-ratio: 16 / 9; /* Consistent widescreen shape */
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows full image without cropping on single page */
}

/* Action bar tweak for desktop */
.desktop-actions {
    border-radius: 0 0 12px 12px;
    border: 1px solid #eee;
    background: #fff;
}

.details-text {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

.details-text h3 {
    margin-bottom: 10px;
}

/* Related Mini Grid for Desktop Walls */
.desktop-mini {
    grid-template-columns: 1fr; /* Stack them in sidebar */
}

.desktop-mini img {
    aspect-ratio: 16 / 9; /* Keeps related thumbs widescreen too */
    margin-bottom: 5px;
}

/* Tablet & Mobile Adjustments */
@media (max-width: 900px) {
    .desktop-layout {
        grid-template-columns: 1fr;
    }
    .desktop-preview {
        aspect-ratio: 16 / 9;
    }
}
/* Page Content Styles */
.page-content {
    max-width: 800px; /* Narrower for better readability */
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.article-body h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #111;
}

.last-updated {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 30px;
    font-style: italic;
}

.article-body h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #222;
}

.article-body p {
    margin-bottom: 20px;
    color: #444;
    line-height: 1.8;
}

.article-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body ul li {
    margin-bottom: 10px;
    color: #444;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .page-content {
        margin: 20px 15px;
        padding: 25px;
    }
    .article-body h1 {
        font-size: 1.8rem;
    }
}
/* Article Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 30px;
}

.article-header { margin-bottom: 25px; }
.category-tag { background: #000; color: #fff; padding: 3px 10px; font-size: 0.75rem; text-transform: uppercase; border-radius: 3px; }
.article-header h1 { font-size: 2.8rem; margin: 15px 0; line-height: 1.2; }
.article-meta { color: #888; font-size: 0.9rem; }

.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
}

.article-body { font-size: 1.1rem; color: #333; line-height: 1.8; }
.article-body h2 { margin: 35px 0 15px; color: #111; }

blockquote {
    border-left: 5px solid #000;
    padding: 20px;
    margin: 30px 0;
    background: #f9f9f9;
    font-style: italic;
    font-size: 1.2rem;
}

/* Share Buttons */
.share-box {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}
.share-btn {
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #333;
}
.share-btn:hover { background: #000; color: #fff; }

.view-all { 
    display: block; 
    margin-top: 15px; 
    font-size: 0.85rem; 
    font-weight: bold; 
    color: #000; 
}

/* Tablet / Mobile */
@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 2rem; }
    .featured-image { height: 250px; }
}
/* Upload Page Layout */
.upload-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 40px;
}

.upload-container {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #eee;
}

.upload-header { margin-bottom: 30px; }
.upload-header h1 { font-size: 2rem; margin-bottom: 5px; }
.upload-header p { color: #666; }

/* Drag and Drop Zone */
.drop-zone {
    width: 100%;
    height: 200px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.3s;
    background: #fafafa;
    position: relative;
}

.drop-zone:hover { background: #f1f1f1; border-color: #000; }
.drop-zone-input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone-text { color: #888; font-weight: 500; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.checkbox-group { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 25px; font-size: 0.85rem; color: #555; }

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

/* Sidebar Guidelines */
.guidelines-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 25px;
}

.guidelines-box h4 { margin-bottom: 15px; color: #e67e22; }
.guidelines-box ul { list-style: none; }
.guidelines-box ul li { font-size: 0.85rem; padding: 8px 0; border-bottom: 1px solid #f9f9f9; color: #555; }

/* Responsive */
@media (max-width: 900px) {
    .upload-wrapper { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
/* Dual Screen Specific Grid */
.dual-grid {
    grid-template-columns: 1fr; /* Force one wide item per row */
    max-width: 1200px;
    margin: 0 auto;
}

.dual-card {
    /* Magic Ratio for Dual Monitors (32:9) */
    aspect-ratio: 32 / 9 !important; 
    margin-bottom: 10px;
}

.dual-card img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Wide Ad Slot within the grid */
.wide-ad-slot {
    padding: 20px 0;
    background: transparent;
}

/* Tablet/Mobile Adjustment */
@media (max-width: 768px) {
    .dual-card {
        /* On mobile, keep it widescreen but allow it to be smaller */
        aspect-ratio: 21 / 9 !important; 
    }
    .archive-header h1 {
        font-size: 1.5rem;
    }
}
/* Device Page Specifics */
.device-archive {
    margin-top: 30px;
}

.device-header {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.device-info h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.gadget-link-box {
    margin-top: 20px;
    background: #f0f7ff;
    padding: 12px 18px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    display: inline-block;
}

.gadget-link-box span {
    display: block;
    font-size: 0.8rem;
    color: #555;
}

.gadget-link-box a {
    color: #3498db;
    font-weight: bold;
    font-size: 0.95rem;
}

/* Specs Data Card */
.specs-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.specs-card h4 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #888;
}

.specs-card ul {
    list-style: none;
}

.specs-card ul li {
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px solid #f9f9f9;
}

/* Responsive */
@media (max-width: 900px) {
    .device-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .specs-card {
        max-width: 400px;
        margin: 0 auto;
    }
}
/* Gaming Page Specifics */
.gaming-archive {
    margin-top: 30px;
}

.gaming-header {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 40px 0;
    border-bottom: 2px solid #f0f0f0;
}

.status-badge {
    background: #ff0055;
    color: #fff;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.gear-link-box {
    margin-top: 20px;
    background: #1a1a1a;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
}

.gear-link-box span {
    display: block;
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 5px;
}

.gear-link-box a {
    color: #00ffcc; /* Neon accent */
    font-weight: bold;
    text-decoration: none;
}

/* Gaming Info Card */
.gaming-card {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #eee;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.gaming-card h4 {
    color: #111;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.gaming-card ul {
    list-style: none;
}

.gaming-card ul li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #444;
}

/* Mobile Tweak */
@media (max-width: 900px) {
    .gaming-header {
        grid-template-columns: 1fr;
    }
}