/* ===========================
   Base
=========================== */
body {
    background: #101010;
    color: #e8e8e8;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding-top: 68px; /* offset fixed nav */
}

/* ===========================
   Main Content
=========================== */
#main-content {
    padding-top: 24px;
    padding-bottom: 60px;
}

/* ===========================
   Preview Grid
=========================== */
.preview-container {
    display: grid;
    padding: 0 24px;
    margin-top: 20px;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: start;
}

.preview-container-shifted {
    width: calc(100% - 260px);
    margin-left: 260px;
    padding-left: 24px;
    box-sizing: border-box;
}

.preview-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 0;
    box-sizing: border-box;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.preview-item:hover {
    transform: translateY(-4px);
    border-color: rgba(64, 150, 255, 0.38);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(64, 150, 255, 0.12);
    z-index: 10;
}

.preview-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.28s ease;
    border-radius: 12px 12px 0 0;
    order: 0;
}

.preview-item:hover img {
    transform: scale(1.05);
}

.preview-item p {
    position: static;
    margin: 0;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.1px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0 0 12px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease, background 0.2s ease;
}

.preview-item:hover p {
    color: #fff;
    background: rgba(64, 150, 255, 0.1);
    transform: none;
}

.top-bar-style {
    background: #141414;
    border: 1px solid rgba(64, 150, 255, 0.12);
    border-radius: 18px;
    padding: 32px 32px 28px;
    margin: 32px 24px 28px;
    position: relative;
    overflow: hidden;
}

.top-bar-style::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4096ff 40%, #69b4ff 60%, transparent);
}

#categories-title {
    font-size: 13px;
    font-weight: 700;
    color: #4096ff;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
}

#categories-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #4096ff;
    margin: 8px auto 0;
    border-radius: 2px;
}

/* Categories Grid - Modern Static Layout */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 0;
    max-height: none;
    overflow: visible;
    transition: max-height 0.4s ease;
}

.categories-grid.collapsed {
    max-height: 160px; /* Reduced to show only one row */
    overflow: hidden;
}

.show-all-categories-btn {
    display: block;
    margin: 22px auto 0;
    padding: 10px 28px;
    background: transparent;
    color: #4096ff;
    border: 1px solid rgba(64, 150, 255, 0.4);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.25s ease;
}

.show-all-categories-btn:hover {
    background: rgba(64, 150, 255, 0.1);
    border-color: #4096ff;
    transform: translateY(-1px);
}

.category-grid-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 1px solid rgba(64, 150, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.category-grid-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(64, 150, 255, 0.5);
    box-shadow: 0 20px 60px rgba(64, 150, 255, 0.2), 0 0 40px rgba(64, 150, 255, 0.1);
    z-index: 10;
}

.category-grid-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: all 0.4s ease;
    display: block;
}

.category-grid-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.2) contrast(1.1);
}

.category-grid-item p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    margin: 0;
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    transition: all 0.3s ease;
}

.category-grid-item:hover p {
    background: linear-gradient(180deg, transparent 0%, rgba(64, 150, 255, 0.9) 100%);
}

.category-label {
    padding: 20px;
    color: white;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    margin: 100px 20px 20px;
    
    
    
   
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.category-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    
}

.category-label::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #555 0%, #333 100%);
    border-radius: 2px;
}

#load-more-button {
    display: block;
    margin: 32px 24px 40px;
    padding: 14px 0;
    width: calc(100% - 48px);
    background: rgba(64, 150, 255, 0.08);
    color: #4096ff;
    border: 1px solid rgba(64, 150, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.22s ease;
}

#load-more-button:hover {
    background: rgba(64, 150, 255, 0.15);
    border-color: #4096ff;
    box-shadow: 0 0 28px rgba(64, 150, 255, 0.12);
    transform: none;
}

/* Responsive Anpassungen */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .categories-grid.collapsed {
        max-height: 140px;
    }

    .show-all-categories-btn {
        font-size: 14px;
        padding: 12px 32px;
    }

    .preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .categories-grid.collapsed {
        max-height: 120px;
    }

    .show-all-categories-btn {
        font-size: 13px;
        padding: 10px 24px;
    }

    .preview-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
        padding: 0 12px;
    }

    .preview-item p {
        padding: 8px 10px;
        font-size: 11px;
    }

    .top-bar-style {
        margin: 20px 10px;
        padding: 20px;
    }

    .category-label {
        margin: 20px 10px;
        padding: 15px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .categories-grid.collapsed {
        max-height: 140px;
    }

    .preview-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 10px;
    }
}

/* Badge styles for download count and NEW label */
.download-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: bold;
    z-index: 3;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.download-badge.new {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
}

