/* Artwork Detail Page Styles */
.artwork-viewer {
    background: #f8f9fa;
    color: #333333;
    min-height: 100vh;
}

.artwork-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
}

.artwork-header .breadcrumb {
    color: #666666;
}

.artwork-header .breadcrumb a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.artwork-header .breadcrumb a:hover {
    color: #0056b3;
}

.artwork-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.artwork-container {
    position: relative;
    max-width: 1400px;
    width: 100%;
    text-align: center;
}

.zoom-controls {
    position: absolute;
    top: -60px;
    right: 0;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.zoom-btn {
    background: #ffffff;
    border: 1px solid #cccccc;
    color: #333333;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.zoom-reset {
    min-width: 60px;
    font-size: 12px;
}

.artwork-frame {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 90vw;
}

.pixel-art-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    border-radius: 8px;
    cursor: grab;
    width: 100%;
    min-height: 60vh;
    max-height: 80vh;
    background: #f8f9fa;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f8f9fa;
}

.pixel-art-wrapper:active {
    cursor: grabbing;
}

.pixel-art-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pixel-art-wrapper::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 6px;
}

.pixel-art-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 6px;
    border: 2px solid #f8f9fa;
}

.pixel-art-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.pixel-art {
    display: block;
    width: auto;
    height: auto;
    transform-origin: center;
    transition: transform 0.2s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}


.artwork-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.artwork-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333333;
}

.artwork-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666666;
    margin-bottom: 2rem;
}

.artwork-meta {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
}

.artist-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.artist-avatar {
    font-size: 1.5rem;
}

.artist-name {
    font-size: 1.1rem;
    color: #333333;
}

.artist-name a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.artist-name a:hover {
    color: #0056b3;
}

.artist-nationality {
    color: #888888;
    font-size: 0.9rem;
}

/* Related Artworks Section */
.related-artworks {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 3rem 0;
}

.related-artworks .section-title {
    color: #333333;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.related-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-item:hover {
    border-color: #007bff;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.related-item-image {
    position: relative;
    padding-top: 100%;
    background: #f8f9fa;
}

.related-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.related-item-info {
    padding: 1rem;
}

.related-item-title {
    color: #333333;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.related-item-artist {
    color: #666666;
    font-size: 0.8rem;
}

/* Loading state */
.artwork-frame.loading {
    position: relative;
    background: #ffffff;
}

.artwork-frame.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .artwork-main {
        padding: 1rem;
    }

    .zoom-controls {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .artwork-frame {
        padding: 1.5rem;
        max-width: 95vw;
    }

    .pixel-art-wrapper {
        min-height: 50vh;
        max-height: 70vh;
    }

    .artwork-title {
        font-size: 1.5rem;
    }

    .artwork-info {
        text-align: center;
    }

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

    .artist-info {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .artwork-container {
        padding: 0.5rem;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .zoom-reset {
        min-width: 50px;
        font-size: 11px;
    }

    .artwork-frame {
        padding: 1rem;
        max-width: 98vw;
    }

    .pixel-art-wrapper {
        min-height: 45vh;
        max-height: 65vh;
    }

    .artwork-title {
        font-size: 1.3rem;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}