:root {
    --rimuru-blue: #3AA8F6;
    --rimuru-dark-blue: #1E3A8A;
    --rimuru-light-blue: #A5D8FF;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;
    --text-light: #333;
    --text-dark: #f0f0f0;
    --card-bg: #fff;
    --card-dark: #2d2d2d;
    --border-color: #e0e0e0;
    --border-dark: #444;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--text-dark);
}

/* Gallery Page Styles */
.gallery-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    color: var(--rimuru-dark-blue);
    margin-bottom: 1rem;
}

body.dark-mode .gallery-title {
    color: var(--rimuru-blue);
}

.gallery-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
}

body.dark-mode .gallery-description {
    color: var(--text-dark);
}

/* Gallery Categories */
.gallery-categories {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 350px;
    border: 1px solid var(--border-color);
}

body.dark-mode .category-card {
    background-color: var(--card-dark);
    border-color: var(--border-dark);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.category-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30, 58, 138, 0.8), transparent);
    padding: 1.5rem;
    color: white;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

.view-more-btn {
    display: inline-block;
    background-color: var(--rimuru-blue);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background-color: var(--rimuru-dark-blue);
    transform: translateY(-2px);
}

/* Featured Section */
.featured-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--rimuru-dark-blue);
    position: relative;
    padding-bottom: 0.5rem;
}

body.dark-mode .section-title {
    color: var(--rimuru-blue);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--rimuru-blue);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.gallery-item-author {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.gallery-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.like-count {
    font-weight: 500;
}

.download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Featured Artist */
.featured-artist {
    background-color: var(--rimuru-light-blue);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

body.dark-mode .featured-artist {
    background-color: rgba(58, 168, 246, 0.2);
}

.artist-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rimuru-blue);
}

.artist-info {
    flex: 1;
}

.artist-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--rimuru-dark-blue);
}

body.dark-mode .artist-name {
    color: var(--rimuru-blue);
}

.artist-bio {
    margin-bottom: 1rem;
    color: var(--text-light);
}

body.dark-mode .artist-bio {
    color: var(--text-dark);
}

.artist-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--rimuru-dark-blue);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

body.dark-mode .social-link {
    color: var(--rimuru-blue);
}

.social-link:hover {
    color: var(--rimuru-blue);
    transform: translateY(-2px);
}

body.dark-mode .social-link:hover {
    color: var(--rimuru-light-blue);
}

/* Submit Your Work */
.submit-work {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

body.dark-mode .submit-work {
    background-color: var(--card-dark);
    border-color: var(--border-dark);
}

.submit-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--rimuru-dark-blue);
}

body.dark-mode .submit-title {
    color: var(--rimuru-blue);
}

.submit-description {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    color: var(--text-light);
}

body.dark-mode .submit-description {
    color: var(--text-dark);
}

.submit-btn {
    background-color: var(--rimuru-blue);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.submit-btn:hover {
    background-color: var(--rimuru-dark-blue);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2rem auto;
    max-width: 900px;
    border-radius: 10px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

body.dark-mode .modal-content {
    background-color: var(--card-dark);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--border-dark);
}

.modal-title {
    font-weight: 600;
    color: var(--text-light);
}

body.dark-mode .modal-title {
    color: var(--text-dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

body.dark-mode .close-modal {
    color: var(--text-dark);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 1.5rem;
}

.modal-artist {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-artist-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-artist-name {
    font-weight: 600;
    color: var(--text-light);
}

body.dark-mode .modal-artist-name {
    color: var(--text-dark);
}

.modal-work-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

body.dark-mode .modal-work-title {
    color: var(--text-dark);
}

.modal-work-description {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

body.dark-mode .modal-work-description {
    color: var(--text-dark);
}

.modal-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

body.dark-mode .stat-item {
    color: var(--text-dark);
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-like-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

body.dark-mode .modal-like-btn {
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.modal-like-btn.active {
    color: #ff4757;
    border-color: #ff4757;
}

.modal-download-btn {
    background-color: var(--rimuru-blue);
    color: white;
    border: none;
}

.modal-download-btn:hover {
    background-color: var(--rimuru-dark-blue);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-nav .nav-list {
        gap: 1rem;
    }
    
    .gallery-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .category-card {
        width: 100%;
        max-width: 500px;
    }
    
    .featured-artist {
        flex-direction: column;
        text-align: center;
    }
    
    .artist-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--rimuru-dark-blue);
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .main-nav.active {
        transform: translateY(0);
    }
    
    .main-nav .nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 0.8rem 1rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .gallery-title {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-body {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .modal-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .branding {
        gap: 0.5rem;
    }
    
    .site-logo {
        height: 40px;
    }
    
    .utility-nav .login-btn span {
        display: none;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .gallery-container {
        padding: 0 1rem;
    }
    
    .gallery-title {
        font-size: 1.8rem;
    }
    
    .category-overlay {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
}