/* ==========================================
   RESET & ROOT VARIABLES
   ========================================== */

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

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #141414;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #ffffff;
    --accent-hover: #e0e0e0;
    --border: #2a2a2a;
}

/* ==========================================
   BASE STYLES
   ========================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   NAVBAR
   ========================================== */

.navbar {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    z-index: 1002;
}

.logo-img {
    height: 28px;
    width: auto;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 1002;
    order: -1;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-search-mobile {
    display: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-search {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    outline: none;
    min-width: 250px;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(20, 20, 20, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

/* ==========================================
   HERO CAROUSEL
   ========================================== */

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero-carousel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--bg-primary) 100%);
    z-index: 3;
    pointer-events: none;
}

.carousel-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.1) 0%, 
        rgba(0,0,0,0.3) 40%,
        rgba(0,0,0,0.7) 70%,
        rgba(0,0,0,0.95) 100%
    );
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 4;
}

.carousel-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
    color: var(--text-primary);
}

.carousel-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 650px;
    line-height: 1.7;
    text-shadow: 0 1px 10px rgba(0,0,0,0.8);
}

.carousel-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.carousel-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.carousel-cta {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.carousel-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255,255,255,0.2);
}

.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    width: 24px;
    border-radius: 4px;
}

.carousel-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==========================================
   CATEGORIES SECTION - CIRCULAR HORIZONTAL SCROLL
   ========================================== */

.categories-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.categories-scroll-wrapper {
    position: relative;
}

.categories-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.category-circle {
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s;
}

.category-circle:hover {
    transform: translateY(-8px);
}

.category-circle-img-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border);
    margin: 0 auto 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.category-circle:hover .category-circle-img-wrapper {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(255,255,255,0.2);
}

.category-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-circle-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.scroll-left {
    left: -20px;
}

.scroll-right {
    right: -20px;
}

/* ==========================================
   WALLPAPERS SECTION
   ========================================== */

.wallpapers-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.wallpaper-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: block;
}

.wallpaper-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(255,255,255,0.1);
}

.wallpaper-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.wallpaper-card-info {
    padding: 1rem;
}

.wallpaper-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallpaper-card-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    z-index: 5;
}

.footer-content {
    color: var(--text-secondary);
}

/* ==========================================
   RESPONSIVE - TABLET (968px)
   ========================================== */

@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-search {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        border-right: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
        text-shadow: none;
        color: var(--text-primary);
    }

    .nav-search-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        padding-top: 1rem;
        border-top: 2px solid var(--border);
    }

    .nav-search-mobile .search-input {
        width: 100%;
        min-width: 0;
        background: var(--bg-card);
        backdrop-filter: none;
    }

    .nav-search-mobile .search-btn {
        width: 100%;
    }

    .hero-carousel {
        height: 500px;
    }

    .hero-carousel::after {
        height: 100px;
    }

    .carousel-title {
        font-size: 2.2rem;
    }

    .carousel-description {
        font-size: 1rem;
    }

    .carousel-content {
        padding: 2.5rem 1.5rem 2rem;
    }

    .carousel-dots {
        bottom: 1.5rem;
        gap: 0.4rem;
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
    }

    .carousel-dot.active {
        width: 18px;
    }

    .categories-section,
    .wallpapers-section {
        padding: 2rem 1rem;
    }

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

    .categories-scroll {
        gap: 1.5rem;
    }

    .category-circle-img-wrapper {
        width: 100px;
        height: 100px;
    }

    .category-circle-name {
        font-size: 0.9rem;
        max-width: 100px;
    }

    .scroll-btn {
        display: none;
    }

    .wallpapers-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .wallpaper-img {
        height: 180px;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (768px and below)
   ========================================== */

@media (max-width: 768px) {
    /* HIDE CAROUSEL DESCRIPTION AND STATS ON MOBILE */
    .carousel-description.mobile-hidden {
        display: none !important;
    }

    .carousel-stats.mobile-hidden {
        display: none !important;
    }

    .carousel-title {
        margin-bottom: 1.25rem;
    }

    .hero-carousel {
        height: 450px;
    }

    .hero-carousel::after {
        height: 80px;
    }

    .carousel-title {
        font-size: 1.8rem;
    }

    .carousel-cta {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
    }

    .carousel-content {
        padding: 2rem 1rem 1.5rem;
    }

    .carousel-dots {
        bottom: 1rem;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (640px)
   ========================================== */

@media (max-width: 640px) {
    .hero-carousel {
        height: 400px;
    }

    .carousel-title {
        font-size: 1.6rem;
    }

    .carousel-cta {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

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

    .categories-scroll {
        gap: 1.25rem;
    }

    .category-circle-img-wrapper {
        width: 85px;
        height: 85px;
    }

    .category-circle-name {
        font-size: 0.85rem;
        max-width: 85px;
    }

    .wallpapers-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .wallpaper-img {
        height: 160px;
    }
}
