/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ===== NAVIGATION ===== */
nav {
    background: #111;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

/* Desktop Menu */
.nav-links {
    list-style: none;
    display: flex;
    gap: 22px;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #00c3ff;
}

/* Hamburger Icon */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    padding: 30px 20px;
    background: #222;
    color: #fff;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* ===== WALLPAPER PAGE ===== */
.wallpaper-page {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}

.wallpaper-page h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
}

.wallpaper-preview {
    text-align: center;
}

.wallpaper-preview img {
    max-width: 100%;
    border-radius: 10px;
}

/* ===== WALLPAPER INFO ===== */
.wallpaper-info {
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    line-height: 1.7;
}

.wallpaper-info p {
    font-size: 15px;
    margin-bottom: 20px;
    text-align: left;
}

/* ===== DOWNLOAD BUTTON ===== */
.download-btn {
    display: inline-block;
    padding: 12px 26px;
    background: #00c3ff;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #009fd1;
}

.wallpaper-info .download-btn {
    display: block;
    width: fit-content;
    margin: 24px auto 0;
    text-align: center;
}

/* ===== DETAILS GRID ===== */
.wallpaper-details {
    margin-top: 25px;
    font-size: 14px;
    color: #555;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.wallpaper-details div {
    background: #f1f1f1;
    padding: 10px;
    border-radius: 6px;
}

/* Category link */
.category-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

.category-link:hover {
    color: #004999;
    text-decoration: underline;
}

/* ===== MAIN / RELATED GRID (Shared Styles) ===== */
.main-item,
.related-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.main-item img,
.related-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-item:hover img,
.related-item:hover img {
    transform: scale(1.1);
}

.main-title,
.related-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 14px;
    text-align: center;
}

/* ===== MAIN WALLPAPERS ===== */
.main-container {
    max-width: 1400px;
    margin: auto;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1400px;
    margin: auto;
}

.main-wallpapers h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
    color: #222;
}

/* ===== RELATED WALLPAPERS ===== */
.related-container {
    max-width: 1100px;
    margin: auto;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1100px;
    margin: auto;
}

.related-wallpapers h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
    color: #222;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 35px auto;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.pagination a:hover {
    background: #00c3ff;
    border-color: #00c3ff;
    color: #000;
}

.pagination .active {
    background: #00c3ff;
    border-color: #00c3ff;
    color: #000;
    pointer-events: none;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 15px;
    background: #111;
    color: #ccc;
    font-size: 14px;
    margin-top: 40px;
}

/* ===== MOBILE NAVIGATION ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111;
        flex-direction: column;
        align-items: center;
        display: none;
        border-top: 1px solid #222;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: 14px 0;
        font-size: 16px;
    }
}
