* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f0f0f0;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 1rem 0;
}

nav ul li {
    display: inline;
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

.moodboard-section {
    padding: 0.5rem;
    margin: 0;
    display: none;
}

.moodboard-section h2,
.moodboard-section h3 {
    display: none;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.grid-container figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    aspect-ratio: 4/3;
}

.grid-container img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-container figure:hover img {
    transform: scale(1.33);
}

.grid-container figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.grid-container figure:hover figcaption {
    transform: translateY(0);
}

.category-tags {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
    padding-bottom: 1.5rem;
}

.grid-container figure:hover .category-tags {
    opacity: 1;
}

.category-tag {
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    font-size: 0.75rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.tag-container,
.tag-filters,
.tag-button {
    display: none;
}

.category-filters {
    padding: 0;
    background: transparent;
    color: white;
    font-size: 0.9rem;
}

.category-filters ul {
    list-style: none;
    margin-left: 1.2rem;
}

.category-filters > ul {
    margin-left: 0;
}

.category-filters li {
    margin: 0.15rem 0;
}

.category-button {
    padding: 0.15rem 0.5rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    font-size: inherit;
}

.category-button:hover {
    background: #555;
}

.category-button.active {
    background: #4CAF50;
}

.category-button.empty {
    opacity: 0.5;
    color: #ccc;
    cursor: default;
}

.category-button.empty:hover {
    background: transparent;
}

.category-button[data-category*="_"] {
    margin-left: 0;
}

.content-wrapper {
    display: flex;
    min-height: calc(100vh - 150px);
}

.sidebar {
    width: 300px;
    background: #444;
    color: white;
    padding: 1rem;
    overflow-y: auto;
    flex-shrink: 0;
}

#moodboard-container {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 300px;
    }
}

.modal {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    display: block;
    margin: 0 auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.caption {
    color: #ccc;
    margin-top: 1rem;
    text-align: center;
    max-width: 80%;
    font-size: 1rem;
    line-height: 1.4;
    display: block;
    padding: 0.5rem 1rem;
    text-align: left;
}