* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 1rem;
}

.search-box button {
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #c0392b;
}

/* Featured Categories */
.featured-categories {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

.featured-categories h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.category-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.category-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
}

.category-image.nature {
    background: linear-gradient(to right, #11998e, #38ef7d);
}

.category-image.abstract {
    background: linear-gradient(to right, #667eea, #764ba2);
}

.category-image.technology {
    background: linear-gradient(to right, #2193b0, #6dd5ed);
}

.category-image.minimal {
    background: linear-gradient(to right, #bdc3c7, #2c3e50);
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Latest Wallpapers */
.latest-wallpapers {
    padding: 4rem 0;
}

.latest-wallpapers h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.wallpaper-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.wallpaper-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd),
                linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.wallpaper-item h4 {
    padding: 1rem;
    color: var(--primary-color);
}

.wallpaper-item p {
    padding: 0 1rem 1rem;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.feature {
    text-align: center;
    padding: 2rem;
}

.feature h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: rgba(255,255,255,0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
    
    .category-grid,
    .wallpaper-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .featured-categories,
    .latest-wallpapers,
    .features {
        padding: 2rem 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
}