/*
 * Licence : CC BY-NC-SA 4.0
 * Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International
 * https://creativecommons.org/licenses/by-nc-sa/4.0/
 *
 * Auteur : Urval Neto
 */

/* ==========================================
   STYLE CSS - GALERIE D'URVAL
   ========================================== */

/* Réinitialisation et styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
}

/* ================== UI OVERLAY ================== */

/* Masquer le bouton */
.a-enter-vr-button {
    display: none !important;
}

/* Conteneur principal pour tous les éléments UI */
.ui-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Masquer le conteneur par défaut */
.ui-container.hidden {
    display: none;
}

/* Activation du pointeur-events quand visible */
.ui-container:not(.hidden) {
    pointer-events: auto;
}

/* Classe pour désactiver les contrôles 3D */
.ui-active .canvas-container,
body.ui-active canvas,
body.ui-active .a-canvas {
    pointer-events: none !important;
}

/* Garantir que les éléments UI ne passent pas les événements vers le canvas */
.admin-panel,
.gallery-panel,
.login-modal,
.cartel-panel,
.help-panel,
.audio-player {
    pointer-events: auto !important;
}

/* Empêcher le focus sur les éléments UI de propagation vers la 3D */
.admin-panel *,
.gallery-panel *,
.login-modal *,
.cartel-panel *,
.help-panel *,
.audio-player * {
    pointer-events: auto;
}

/* ================== CARTEL PANEL ================== */

/* Panneau principal du cartel – positionné à droite du centre */
.cartel-panel {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 3px solid #87CEEB;
    border-radius: 12px;
    padding: 24px 20px 20px 20px; /* top plus haut pour la drag handle */
    width: 340px;
    max-width: 340px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(135, 206, 235, 0.3);
    animation: slideIn 0.3s ease-out;
    position: fixed;
    bottom: 30px;
    right: 25%;  /* Aligné sur le centre, pas de chevauchement */
    z-index: 800;
}

/* Animation d'arrivée du cartel */
@keyframes slideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contenu du cartel */
.cartel-content {
    color: #ffffff;
}

/* Titre de l'œuvre */
.cartel-panel h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #87CEEB;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Nom de l'artiste */
.cartel-panel p.artist {
    font-size: 0.9rem;
    color: #fdcb36;
    font-style: italic;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Description de l'œuvre */
.cartel-panel p.description {
    font-size: 0.8rem;
    color: #d4d4d4;
    line-height: 1.5;
    margin-bottom: 0;
    text-align: justify;
}

/* Bouton Fermer - petit like help panel */
.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #87CEEB;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #ffffff;
}

.close-btn:active {
    transform: scale(0.95);
}

/* Bouton Plein écran pour l'image */
.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 50px;
    background: none;
    border: none;
    color: #87CEEB;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

/* ================== HELP PANEL ================== */

/* Panneau d'aide en haut à gauche */
.help-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-left: 4px solid #87CEEB;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    max-width: 350px;
    z-index: 500;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
    pointer-events: auto; /* Le panneau capture les clics pour pouvoir fermer en cliquant à l'extérieur */
}

/* Tous les enfants du panneau ne capturent pas les événements, sauf le bouton de fermeture */
.help-panel > * {
    pointer-events: none;
}

.help-panel .close-btn-help {
    pointer-events: auto; /* Le bouton de fermeture reste cliquable */
}

.close-btn-help {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #87CEEB;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-btn-help:hover {
    color: #ffffff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.help-panel h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #87CEEB;
}

.help-panel p {
    margin-bottom: 8px;
    line-height: 1.4;
}

.help-panel strong {
    color: #fdcb36;
}

/* ================== RESPONSIVE ================== */

/* Petit écran */
@media (max-width: 768px) {
    .cartel-panel {
        padding: 20px;
        max-width: 90%;
    }

    .cartel-panel h2 {
        font-size: 1.8rem;
    }

    .cartel-panel p.artist {
        font-size: 1rem;
    }

    .cartel-panel p.description {
        font-size: 0.95rem;
    }

    .help-panel {
        max-width: calc(100% - 40px);
        font-size: 0.85rem;
    }
}

/* Très petit écran */
@media (max-width: 480px) {
    .cartel-panel {
        padding: 15px;
    }

    .cartel-panel h2 {
        font-size: 1.5rem;
    }

    .help-panel {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
        font-size: 0.8rem;
    }

    .help-panel h1 {
        font-size: 1.2rem;
    }
}

/* ================== TRANSITIONS & ANIMATIONS ================== */

/* Transition fluide pour les changements d'état */
button, div {
    transition: all 0.2s ease;
}

/* Effet glow sur les éléments interactifs */
.cartel-panel {
    transition: box-shadow 0.3s ease;
}

.cartel-panel:hover {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(135, 206, 235, 0.4);
}

/* ================== SPLASH SCREEN ================== */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

/* Permettre les clics uniquement sur le bouton invisible */
#splashScreen .enter-btn {
    pointer-events: auto;
}

.splash-content {
    text-align: center;
    margin-bottom: 20px;
}

#splashLogo {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
}

#splashScreen p {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
}

/* Bouton invisible superposé au texte "Entrer" pour mobile/tablette */
.enter-wrapper {
    display: inline-block;
    position: relative;
    padding: 0.5em 0.2em; /* Augmente la zone tactile */
}

.enter-btn {
    position: absolute;
    inset: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
}

#splashLicense {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: auto;
    opacity: 0.7;
    pointer-events: none;
}

/* Fade out animation */
.fade-out {
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ================== AUDIO PLAYER ================== */
.audio-player {
    position: fixed;
    left: 25%;  /* Aligné sur le centre, pas de chevauchement */
    bottom: 30px;
    transform: translateX(0);
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid #87CEEB;
    border-radius: 12px;
    padding: 24px 20px 12px 20px; /* top plus haut pour la drag handle */
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 320px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    animation: slideIn 0.3s ease-out;
}

.audio-player.hidden { display: none; }

/* ================== DRAG HANDLES ================== */

/* Poignée de drag horizontal - invisible mais fonctionnelle */
.drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px; /* Zone tactile plus grande pour mobile/tablette */
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Les panels déplaçables n'ont pas de transition sur leur position */
.cartel-panel,
.audio-player {
    transition: none !important;
}

/* La poignée capture les événements mais reste visuellement invisible */
.cartel-panel .drag-handle,
.audio-player .drag-handle {
    pointer-events: auto;
}

/* Augmenter le padding-top des panels pour laisser place à la poignée */
.cartel-panel {
    padding-top: 32px; /* Laisser place pour la drag handle (30px + 2px marge) */
}

.audio-player {
    padding-top: 32px; /* Laisser place pour la drag handle (30px + 2px marge) */
}

.audio-header { color: #fff; font-size: 0.85rem; }
.audio-buttons { display: flex; justify-content: center; gap: 10px; }
.audio-btn {
    width: 48px; height: 48px; border-radius: 50%;
    background: #87CEEB; border: none; color: #1a1a1a;
    font-size: 1.2rem; cursor: pointer;
}
.audio-btn:hover { background: #fff; }
.audio-btn-small {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(135, 206, 235, 0.2); border: 1px solid #87CEEB;
    color: #87CEEB; font-size: 1rem; cursor: pointer;
}
.audio-btn-small:hover { background: #87CEEB; color: #1a1a1a; }
.audio-timeline {
    display: flex; align-items: center; gap: 8px;
    color: #aaa; font-size: 0.75rem;
}
.audio-slider {
    flex: 1; height: 4px; -webkit-appearance: none;
    background: #444; border-radius: 2px; cursor: pointer;
}
.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 12px; height: 12px;
    background: #87CEEB; border-radius: 50%; cursor: pointer;
}
.audio-vol {
    display: flex; align-items: center; gap: 8px;
    color: #aaa; font-size: 0.75rem;
}

/* ================== MANAGE PANEL ================== */

.manage-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 3px solid #f1c40f;
    border-radius: 12px;
    padding: 15px;
    width: 320px;
    z-index: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    max-height: 80vh;
    overflow-y: auto;
}

.manage-panel.hidden {
    display: none;
}

/* Réactiver les événements sur les éléments interactifs du panel de gestion */
.manage-panel button,
.manage-panel input,
.manage-panel textarea,
.manage-panel select,
.manage-panel .close-btn,
.manage-panel .admin-tab-btn {
    pointer-events: auto;
}

/* Liste des fichiers uploadés */
.file-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.file-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.8rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #f1c40f;
}

.file-name {
    font-weight: 600;
    color: #f1c40f;
    word-break: break-all;
    font-size: 0.85rem;
}

.file-path {
    font-size: 0.75rem;
    color: #aaa;
    word-break: break-all;
}

.file-meta {
    font-size: 0.7rem;
    color: #888;
    display: flex;
    justify-content: space-between;
}

.file-item.orphan {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.file-item.orphan .file-name {
    color: #e74c3c;
}

.file-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.file-actions button {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-actions button:hover {
    background: #f1c40f;
    color: #1a1a1a;
    border-color: #f1c40f;
}

.file-actions button.download-btn:hover {
    background: #2ECC71;
    border-color: #2ECC71;
}

.file-actions button.delete-btn:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

.file-empty {
    color: #888;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* ================== LOGIN BUTTON ================== */

.login-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #87CEEB;
    color: #87CEEB;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 500;
    transition: all 0.3s ease;
    font-weight: 600;
    display: none;
}

.login-btn.visible, .login-btn.admin-active {
    display: block;
}

.login-btn.create-gallery-btn {
    border-color: #9b59b6;
    color: #9b59b6;
}

.login-btn.create-gallery-btn:hover {
    background: #9b59b6;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

.login-btn:hover {
    background: #87CEEB;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(135, 206, 235, 0.5);
}

/* Bouton Galerie (à côté du bouton admin) */
.login-btn.create-btn {
    left: 160px;
    border-color: #87CEEB;
    color: #87CEEB;
}

.login-btn.create-btn:hover {
    background: #87CEEB;
    color: #1a1a1a;
    box-shadow: 0 0 20px rgba(135, 206, 235, 0.5);
}

/* Bouton Gérer (à côté du bouton galerie) */
.login-btn.manage-btn {
    left: 270px;
    border-color: #f1c40f;
    color: #f1c40f;
}

.login-btn.manage-btn:hover {
    background: #f1c40f;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
}

/* ================== LOGIN MODAL ================== */

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-modal.active {
    display: flex;
    pointer-events: auto;
}

.login-modal.active input,
.login-modal.active button,
.login-modal.active textarea,
.login-modal.active select {
    pointer-events: auto;
}

.login-panel {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 3px solid #87CEEB;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 50px rgba(135, 206, 235, 0.3);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.login-panel h2 {
    color: #87CEEB;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.login-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: #87CEEB;
}

.login-submit {
    width: 100%;
    padding: 15px;
    background: #87CEEB;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-submit:hover {
    background: #ff5252;
    transform: scale(1.02);
}

.login-error {
    color: #ff5252;
    text-align: center;
    margin-top: 15px;
    display: none;
}

.login-error.active {
    display: block;
}

/* ================== ADMIN PANEL ================== */

.admin-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 3px solid #87CEEB;
    border-radius: 12px;
    padding: 15px;
    width: 300px;
    z-index: 9999 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    max-height: 80vh;
    overflow-y: auto;
}

/* Scrollbar fine pour le panneau admin */
.admin-panel::-webkit-scrollbar {
    width: 6px;
}
.admin-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.admin-panel::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Réactiver les événements sur les éléments interactifs du panneau admin */
.admin-panel button,
.admin-panel input,
.admin-panel textarea,
.admin-panel select,
.admin-panel .close-btn,
.admin-tab-btn {
    pointer-events: auto;
}

.admin-panel.hidden {
    display: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.admin-header h3 {
    color: #87CEEB;
    font-size: 1rem;
    margin: 0;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.delete-btn {
    background: rgba(231, 76, 60, 0.8);
    border: 2px solid #E74C3C;
    color: #E74C3C;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.delete-btn:hover {
    background: #E74C3C;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-section {
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.admin-section h4 {
    color: #87CEEB;
    font-size: 0.9rem;
    margin: 0 0 10px 0;
}

.admin-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: auto;
}

.admin-group label {
    color: #ffffff;
    font-size: 0.85rem;
}

.admin-group input[type="range"] {
    width: 100%;
    accent-color: #87CEEB;
}

.admin-group input[type="text"],
.admin-group textarea {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ffffff;
    padding: 8px;
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
}

.admin-group input[type="text"]:focus,
.admin-group textarea:focus {
    border-color: #87CEEB;
    outline: none;
}

.admin-group textarea {
    resize: vertical;
    min-height: 60px;
}

.admin-group span {
    color: #87CEEB;
    font-size: 0.85rem;
    text-align: right;
}

.save-btn {
    background: #87CEEB;
    border: none;
    border-radius: 8px;
    color: #1a1a1a;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.save-btn:hover {
    background: #5bbce8;
    transform: scale(1.02);
}

/* ================== ADMIN – ONGLETS ================== */

.admin-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.admin-tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px 6px 0 0;
    color: #aaa;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.admin-tab-btn:hover {
    background: #3a3a3a;
    color: #fff;
}

.admin-tab-btn.active {
    background: #87CEEB;
    color: #1a1a1a;
    border-color: #87CEEB;
}

.admin-tab-pane {
    display: none;
}

.admin-tab-pane.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ================== ADMIN – UPLOAD IMAGE ================== */

.admin-file-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.admin-file-input::file-selector-button {
    background-color: #4a4a4a;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
}

.admin-file-input::file-selector-button:hover {
    background-color: #5a5a5a;
}

/* ================== GALLERY PANEL ================== */

.gallery-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 3px solid #87CEEB;
    border-radius: 12px;
    padding: 20px;
    width: 380px;
    max-width: 90vw;
    z-index: 2500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 30px rgba(135, 206, 235, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    pointer-events: auto;
}

.gallery-panel.hidden {
    display: none;
}

.gallery-panel h3 {
    color: #87CEEB;
    font-size: 1.2rem;
    margin: 0;
}

.gallery-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-content .admin-section h4 {
    color: #87CEEB;
    font-size: 0.95rem;
    margin: 0 0 10px 0;
}

.gallery-content .admin-group label {
    color: #ffffff;
    font-size: 0.85rem;
}

.gallery-content .admin-group input[type="range"] {
    accent-color: #87CEEB;
}

.gallery-content select {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #87CEEB;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2387CEEB%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

.gallery-content select:hover,
.gallery-content select:focus {
    border-color: #fff;
    outline: none;
}

.gallery-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.gallery-tab-btn {
    flex: 1;
    padding: 10px 15px;
    background: #1a1a1a;
    color: #888;
    border: 2px solid #444;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-tab-btn:hover {
    background: #2a2a2a;
    color: #fff;
}

.gallery-tab-btn.active {
    background: #87CEEB;
    color: #000;
    border-color: #87CEEB;
}

.gallery-tab-content {
    display: flex;
    flex-direction: column;
}

.gallery-tab-pane {
    display: none;
}

.gallery-tab-pane.active {
    display: block;
}

#currentArtworkPreview {
    border: 2px solid #444;
    border-radius: 4px;
    background-color: #1a1a1a;
    display: block;
    margin-top: 5px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* ================== FULLSCREEN MODAL ================== */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-modal.hidden {
    display: none;
}

.fullscreen-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: 2px solid #87CEEB;
    box-shadow: 0 0 50px rgba(135, 206, 235, 0.3);
}

.close-fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: 2px solid #87CEEB;
    color: #87CEEB;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 2001;
}

.close-fullscreen-btn:hover {
    background: #87CEEB;
    color: #000;
}
