/* === PROFILES & SAVES === */
.profile-list, .save-slots {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.profile-item, .save-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-item:hover, .save-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.profile-info, .save-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-info h4, .save-info h4 {
    margin: 0;
    color: var(--gold);
}

.profile-info span, .save-info span {
    font-size: 0.85rem;
    color: var(--parchment-dark);
}

.save-slot-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
    flex-shrink: 0;
}

.save-char-info {
    font-size: 0.9rem;
    color: var(--parchment);
    font-style: italic;
}

.save-story-title {
    font-size: 0.85rem;
    color: var(--gold-light);
}

.save-date {
    font-size: 0.8rem;
    color: var(--parchment-dark);
}


.load-screen-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.profile-actions input {
    flex: 1;
}

.hud-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.autosave-status {
    margin-left: auto;
    font-size: 0.75rem;
    font-family: 'Crimson Text', serif;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.autosave-status:not(:empty) {
    opacity: 1;
}

.autosave-status.autosave-ok {
    color: #7ecf7e;
}

.autosave-status.autosave-local {
    color: #a0a0a0;
}

.autosave-status.autosave-warn {
    color: var(--gold);
}

.auth-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.auth-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error-text {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.success-text {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.loading-text {
    color: var(--parchment-dark);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* === BOUTON MUSIQUE TITRE === */
.btn-title-music {
    position: absolute;
    top: 1.2rem;
    left: 1.5rem;
    z-index: 10;
}

/* === USER INDICATOR (titre) === */
.user-indicator {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 10;
}

.user-badge {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.85rem;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 20px;
    padding: 4px 12px;
    white-space: nowrap;
}

/* === PROFILE SCREEN === */
#profile-screen {
    background: linear-gradient(180deg, #1a0a00 0%, #0d0d2b 50%, #1a0a00 100%);
    padding: 2rem;
    overflow-y: auto;
}

.profile-header {
    text-align: center;
    padding-bottom: 0.75rem;
    margin-bottom: 0;
}

.profile-header h2 {
    font-family: 'MedievalSharp', cursive;
    color: var(--gold);
    font-size: 1.8rem;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    margin-bottom: 1rem;
    gap: 0;
}

.profile-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1.4rem;
    cursor: pointer;
    font-family: 'MedievalSharp', cursive;
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(244, 228, 193, 0.4);
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}

.profile-tab:hover {
    color: rgba(244, 228, 193, 0.75);
}

.profile-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.profile-tab-content {
    min-height: 180px;
}

.profile-parcours {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.4rem;
}
.parcours-story {
    margin-bottom: 1.4rem;
    border: 1px solid rgba(201, 168, 76, 0.18);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.18);
}
.parcours-story-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
}
.parcours-story-icon {
    font-size: 1.6rem;
    color: var(--gold);
}
.parcours-story-head h4 {
    color: var(--gold);
    font-family: 'MedievalSharp', cursive;
    font-size: 1.05rem;
    margin: 0;
}
.parcours-progress {
    color: var(--parchment-dark);
    font-size: 0.8rem;
    opacity: 0.8;
}
.parcours-endings {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.parcours-ending {
    background: rgba(0, 0, 0, 0.25);
    border-left: 2px solid var(--gold);
    padding: 0.4rem 0.7rem;
    border-radius: 2px;
}
.parcours-ending h5 {
    color: var(--parchment);
    font-family: 'MedievalSharp', cursive;
    font-size: 0.9rem;
    margin: 0 0 0.2rem;
}
.parcours-ending-meta {
    color: var(--parchment-dark);
    font-size: 0.75rem;
    margin: 0 0 0.3rem;
    opacity: 0.75;
}
.parcours-ending-preview {
    color: var(--parchment);
    font-style: italic;
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.85;
}
.parcours-empty {
    color: var(--parchment-dark);
    font-style: italic;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}

.profile-account-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
    max-width: 320px;
    margin: 0 auto;
}

.profile-saves-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.profile-footer-simple {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.profile-footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
}

/* === ADMIN SCREEN === */
#admin-screen {
    background: linear-gradient(180deg, #1a0a00 0%, #0d0d2b 50%, #1a0a00 100%);
    padding: 2rem;
    overflow-y: auto;
}

.admin-panel {
    max-width: 800px;
    width: 100%;
}

.admin-users {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1.5rem 0;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.admin-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 8px;
    gap: 1rem;
    transition: background 0.2s;
}

.admin-user-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    min-width: 0;
}

.admin-user-name {
    font-family: 'MedievalSharp', cursive;
    color: var(--parchment);
    font-size: 1rem;
}

.admin-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(201, 168, 76, 0.2);
    border: 1px solid var(--gold);
    border-radius: 10px;
    color: var(--gold);
    white-space: nowrap;
}

.admin-user-saves {
    font-size: 0.82rem;
    color: var(--parchment-dark);
    font-style: italic;
}

.admin-user-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-medieval.danger {
    background: linear-gradient(180deg, rgba(139, 26, 26, 0.3) 0%, rgba(100, 10, 10, 0.2) 100%);
    border-color: rgba(192, 57, 43, 0.5);
    color: #e8a09a;
}

.btn-medieval.danger:hover {
    background: linear-gradient(180deg, rgba(192, 57, 43, 0.4) 0%, rgba(139, 26, 26, 0.3) 100%);
    border-color: var(--blood-light);
    color: #f5b7b1;
}

