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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #ffffff;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.spinner-small {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
.header {
    background: #000000;
    border-bottom: 1px solid #ffffff;
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: #000000;
    border: 1px solid #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.nav-link:hover {
    background: #ffffff;
    color: #000000;
}

.logout-btn {
    background: #000000;
    border: 1px solid #ffffff;
}

.user-name {
    color: white;
    font-weight: 600;
    padding: 8px 24px;
    background: #000000;
    border: 1px solid #ffffff;
    border-radius: 50px;
    font-size: 14px;
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Filters section */
.filters-section {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ffffff;
    background: #000000;
    color: #ffffff;
    border-radius: 50px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.search-btn {
    padding: 12px 32px;
    background: #000000;
    color: white;
    border: 1px solid #ffffff;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #ffffff;
    color: #000000;
}

.stats {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.stats span {
    color: #ffffff;
    font-size: 18px;
}

/* Grid container - Masonry/Staggered layout */
.grid-container {
    column-count: 5;
    column-gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .grid-container {
        column-count: 4;
    }
}

@media (max-width: 1024px) {
    .grid-container {
        column-count: 3;
    }
}

@media (max-width: 640px) {
    .grid-container {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .grid-container {
        column-count: 1;
    }
}

/* Design card */
.design-card {
    background: #000000;
    border: 1px solid #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}

.design-card:hover {
    transform: translateY(-4px);
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.design-image {
    width: 100%;
    object-fit: cover;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.design-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-info {
    padding: 16px;
}

.design-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #aaaaaa;
    font-size: 13px;
}

.design-team {
    background: #000000;
    color: white;
    border: 1px solid #ffffff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

/* Loading more */
.loading-more,
.no-more {
    text-align: center;
    padding: 40px;
    color: #ffffff;
}

.no-more {
    color: #aaaaaa;
    font-size: 14px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: #ffffff;
    margin-bottom: 10px;
}

.empty-state p {
    color: #aaaaaa;
    margin-bottom: 30px;
}

.create-btn {
    display: inline-block;
    padding: 12px 40px;
    background: #000000;
    color: white;
    border: 1px solid #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.create-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .search-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    /* Aspect ratio set dynamically via inline style */
}
