/* 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: 1rem;
    right: 1rem;
    z-index: 10;
    width: auto;
}

.zoom-slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    background: #ffffff;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zoom-label {
    font-size: 0.9rem;
    color: #666666;
    font-weight: 500;
    white-space: nowrap;
}

.zoom-slider {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    background: #0056b3;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.4);
    transform: scale(1.1);
}

.zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

.zoom-slider::-moz-range-thumb:hover {
    background: #0056b3;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.4);
    transform: scale(1.1);
}

.zoom-value {
    font-size: 0.9rem;
    color: #333333;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}


.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;
    position: relative;
}

.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;
        width: 100%;
        max-width: none;
    }

    .zoom-slider-container {
        padding: 0.75rem;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .zoom-label {
        font-size: 0.85rem;
    }

    .zoom-slider {
        height: 8px; /* Thicker slider for mobile */
    }

    .zoom-slider::-webkit-slider-thumb {
        width: 24px; /* Larger thumb for mobile */
        height: 24px;
    }

    .zoom-slider::-moz-range-thumb {
        width: 24px; /* Larger thumb for mobile */
        height: 24px;
    }

    .zoom-value {
        font-size: 0.85rem;
        min-width: 40px;
    }

    .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-slider-container {
        padding: 0.4rem;
        gap: 0.5rem;
    }

    .zoom-label {
        font-size: 0.8rem;
    }

    .zoom-slider {
        height: 8px;
    }

    .zoom-slider::-webkit-slider-thumb {
        width: 28px; /* Even larger thumb for very small screens */
        height: 28px;
    }

    .zoom-slider::-moz-range-thumb {
        width: 28px; /* Even larger thumb for very small screens */
        height: 28px;
    }

    .zoom-value {
        font-size: 0.8rem;
        min-width: 38px;
    }

    .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));
    }
}