/* General Styles */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --text-color: #2C3E50;
    --background-color: #F7F9FC;
}

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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    /*margin-bottom: 2rem;*/
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navigation */
nav {
    background-color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

nav a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Gallery Styles */
.gallery-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.artwork-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artwork-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.artwork-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.artwork-info {
    padding: 1rem;
}

.artwork-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.artwork-info p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.medium, .mood {
    color: var(--secondary-color);
    font-weight: bold;
}

.date {
    color: #666;
    font-size: 0.8rem;
}

/* Upload Form Styles */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}

input[type="text"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #ff5252;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

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

    .upload-container {
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    nav a {
        display: block;
        margin: 0.5rem 0;
    }

    .artwork-card img {
        height: 200px;
    }
}

/* Animation for success messages */
.success-message {
    background-color: #4CAF50;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin: 1rem 0;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Artwork Detail View */
.artwork-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.artwork-detail {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .artwork-detail {
        grid-template-columns: 3fr 2fr;
    }
}

.artwork-detail .artwork-image {
    position: relative;
    overflow: hidden;
    background: var(--background-color);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.artwork-detail .artwork-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.artwork-info-detail {
    padding: 2rem;
}

.info-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-section h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.info-section p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Button group styling */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.button-group .back-button {
    margin-right: auto; /* Push to the left */
}

.button-group .action-buttons {
    display: flex;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #eee;
}

.back-button, .edit-button, .delete-button {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.back-button:hover, .edit-button:hover {
    background-color: #45b6b0;
}

.delete-button {
    background-color: #ff4444;
}

.delete-button:hover {
    background-color: #ff1111;
}

/* Responsive adjustments for detail view */
@media (max-width: 768px) {
    .artwork-detail-container {
        padding: 1rem;
    }

    .artwork-detail {
        grid-template-columns: 1fr;
    }

    .artwork-detail .artwork-image {
        min-height: 250px;
    }

    .artwork-info-detail {
        padding: 1.5rem;
    }

    .artwork-info-detail h2 {
        font-size: 1.5rem;
    }
}

/* Add smooth transition for image loading */
.artwork-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artwork-image img.loaded {
    opacity: 1;
}

.error-message {
    color: var(--primary-color);
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

/* Comments Section */
.comments-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comments-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.comments-list {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 2rem;
}

.comment {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.commenter-name {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-date {
    color: #666;
    font-size: 0.8rem;
}

.comment-text {
    line-height: 1.5;
    white-space: pre-wrap;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 2rem 0;
}

.add-comment-section {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 15px;
}

.add-comment-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.comment-form {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
}

.comment-form .form-group {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.char-count {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.8rem;
}

.submit-comment {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-comment:hover {
    background-color: #45b6b0;
}

/* Success and Error Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message {
    background-color: #4CAF50;
    color: white;
}

.error-message {
    background-color: #ff4444;
    color: white;
}

/* Responsive adjustments for comments */
@media (max-width: 768px) {
    .comments-section {
        padding: 1rem;
    }

    .comment {
        padding: 1rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-date {
        margin-top: 0.25rem;
    }

    .add-comment-section {
        padding: 1rem;
    }

    .comment-form {
        padding: 1rem;
    }
} 