.creator-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

@media screen and (max-width: 768px) {
    .creator-container {
        padding: 0 0.5rem;
    }
}

.creator-layout {
    position: relative; /* Ajouté pour le positionnement absolu des toggles */
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 1rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Masquer les toggles par défaut */
.options-toggle {
    display: none;
}

.creator-options {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    width: 300px;
    flex-shrink: 0;
}

.creator-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 0;
    flex-shrink: 0;
}

.creator-preview {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 500px; /* Ajusté pour correspondre à la hauteur de la carte */
}

.option-group {
    margin-bottom: 1.5rem;
    transition: opacity 0.3s ease;
}

.option-group[style*="display: none"] {
    margin: 0;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.option-group h3 {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.creator-select {
    width: 100%;
    padding: 0.5rem;
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    font-family: 'Cinzel', serif;
}

.creator-input,
.creator-textarea {
    width: 100%;
    padding: 0.5rem;
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    font-family: 'Cinzel', serif;
}

.creator-textarea {
    min-height: 100px;
    resize: vertical;
}

.creator-file {
    width: 100%;
    padding: 0.5rem 0;
    color: var(--text-color);
}

.creator-button {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: filter 0.3s ease;
    color: #ffffff; /* Force white text on accent color button */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 
                 0 0 5px rgba(0, 0, 0, 0.5);
}

.creator-button:hover {
    filter: brightness(1.2);
}

/* Style personnalisé pour l'input file */
.creator-file::-webkit-file-upload-button {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    margin-right: 1rem;
    color: #ffffff; /* Force white text on accent color button */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8),
                 0 0 5px rgba(0, 0, 0, 0.5);
}

.card-layers {
    position: relative;
    width: 350px;
    height: 500px;
    border-radius: 24px; /* Augmenté pour un meilleur effet visuel */
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ajout d'une ombre pour mieux voir les bords */
    cursor: default;
}

.card-layers::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    pointer-events: none;
    z-index: 3;
}

.card-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
    border-radius: 24px; /* Même valeur que le conteneur parent */
    object-fit: cover; /* Assure que l'image couvre bien toute la zone */
    pointer-events: none;
}

#layer-illustration {
    transition: object-position 0.1s ease;
    user-select: none;
    pointer-events: auto;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .creator-layout {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .creator-options {
        position: fixed;
        top: calc(90px + 1rem); /* Augmenté pour la navbar en mode hamburger */
        height: calc(100vh - 90px - 1rem); /* Ajusté en conséquence */
        width: 300px;
        background: var(--secondary-color);
        padding: 1rem;
        transition: transform 0.3s ease;
        z-index: 100;
        overflow-y: auto;
    }

    .creator-options-left {
        left: 0;
        transform: translateX(-100%);
    }

    .creator-options-right {
        right: 0;
        transform: translateX(100%);
    }

    .creator-options-left.active {
        transform: translateX(0);
    }

    .creator-options-right.active {
        transform: translateX(0);
    }

    .creator-preview {
        margin: 2rem 0;
        width: 100%;
    }

    .options-toggle {
        display: flex;
        position: fixed; /* Changed from absolute to fixed */
        top: calc(50% + 45px + 0.5rem); /* Ajusté en fonction de la nouvelle hauteur */
        transform: translateY(-50%);
        background: var(--accent-color);
        border: none;
        width: 30px;
        height: 60px;
        cursor: pointer;
        z-index: 101;
        align-items: center;
        justify-content: center;
    }

    .options-toggle-left {
        left: 0;
        border-radius: 0 4px 4px 0;
    }

    .options-toggle-right {
        right: 0;
        border-radius: 4px 0 0 4px;
    }

    .options-toggle-left::before {
        content: '›';
        border: none;
        width: auto;
        height: auto;
        padding: 0;
        font-size: 32px;
        font-weight: bold;
        color: #ffffff;
        transform: rotate(180deg);  /* Rotate to point left */
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8),
                    0 0 5px rgba(0, 0, 0, 0.5);
    }

    .options-toggle-right::before {
        content: '›';
        border: none;
        width: auto;
        height: auto;
        padding: 0;
        font-size: 32px;
        font-weight: bold;
        color: #ffffff;
        transform: none; /* Removed previous transforms */
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8),
                    0 0 5px rgba(0, 0, 0, 0.5);
    }
}

@media screen and (max-width: 768px) {
    .creator-layout {
        gap: 1rem;
        flex-direction: column;
    }

    .creator-options {
        max-height: none;
        max-width: none;
    }

    .card-layers {
        width: 280px;
        height: 400px;
        border-radius: 20px; /* Légèrement réduit pour les petits écrans */
    }

    .card-layers::after {
        border-radius: 20px;
    }

    .card-layer {
        border-radius: 20px;
    }

    .drag-info {
        max-width: 280px; /* Même largeur que la carte en version mobile */
    }
}

.full-art-group {
    margin-top: 1rem;
}

.full-art-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-color);
}

.full-art-checkbox {
    margin-right: 0.5rem;
    width: auto;
    cursor: pointer;
}

.drag-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-color);
    font-style: italic;
    max-width: 350px; /* Même largeur que la carte */
    width: 100%;
    word-wrap: break-word; /* Permet le retour à la ligne des mots longs */
}

.drag-info.hidden {
    display: none;
}

/* CSS pour l'overlay de compte requis */
.account-required-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.account-required-content {
    background-color: var(--secondary-color, #1a1a1a);
    padding: 2rem;
    border-radius: 5px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    border: 1px solid var(--accent-color, #d4af37);
}

.account-required-content h2 {
    color: var(--accent-color, #d4af37);
    margin-bottom: 1rem;
}

.account-required-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color, #fff);
}

.account-required-content .btn {
    display: inline-block;
    background-color: var(--primary-color, #2b2b2b);
    color: var(--text-color, #fff);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.account-required-content .btn:hover {
    background-color: var(--accent-color, #d4af37);
    color: #000;
}