.profile-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 16px 5rem;
}

/* ------------------------------------- Profilseite ------------------------------------- */

.profile-private {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px dashed var(--border);
    color: var(--font-secundary);
    font-size: 0.85rem;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid #3A2F6B;
    background:
        radial-gradient(ellipse at top left, rgba(182, 255, 0, 0.1), transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(77, 33, 235, 0.4), transparent 60%),
        #0D1020;
}
.profile-intro { flex: 1; min-width: 200px; }
.profile-intro .section-eyebrow { margin-bottom: 0.25rem; }
.profile-intro h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.1;
    word-break: break-word;
}
.profile-meta {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.riot-id {
    font-size: 0.85rem;
    color: var(--font-secundary);
}
.profile-edit-link { align-self: flex-start; }

.profile-bio {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--font-secundary);
    white-space: pre-line;
}

.profile-stats { margin-top: 2.5rem; }
.profile-stats h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.profile-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--font-secundary);
}

/* ------------------------------------- Bearbeiten ------------------------------------- */

.profile-edit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.profile-edit-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }

.profile-edit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    align-items: start;
}
.edit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
}
.edit-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.field-hint {
    font-size: 0.8rem;
    color: var(--font-secundary);
    margin: -0.4rem 0 1rem;
}
.edit-card h2 + .field-hint { margin-top: -0.5rem; }

.riot-linked {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}


.mini-preview { margin-top: 1rem; max-width: 260px; }
.mini-preview .field-hint { margin: 0 0 0.5rem; }

.edit-actions { grid-column: 1 / -1; }
.edit-actions .btn { min-width: 220px; }

.refresh-form {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px dashed var(--border);
}
.refresh-form .field-hint { margin: 0; }

/* Gesperrte Häkchen (Maximum erreicht) */
.checkbox-list input:disabled + label,
.checkbox-list input:disabled { opacity: 0.4; cursor: not-allowed; }
.stat-item[hidden] { display: none; }

/* Hinweis: Mini-Stats nur bei öffentlichem Profil */
.visibility-notice {
    margin: 0 0 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 196, 0, 0.45);
    background: rgba(255, 196, 0, 0.08);
    font-size: 0.82rem;
    color: var(--font-secundary);
}
.visibility-notice strong { color: var(--font); }
.visibility-notice[hidden] { display: none; }

/* ------------------------------------- Profilbild wählen ------------------------------------- */

.avatar-picker {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.avatar-options {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.avatar-options label { cursor: pointer; font-size: 0.9rem; }
.avatar-options input { accent-color: #4D21EB; margin-right: 0.4rem; }
.avatar-options .field-hint { margin: 0 0 0 1.6rem; }
.avatar-fields { flex: 1; min-width: 220px; }
.avatar-fields input[type="file"] {
    font: inherit;
    font-size: 0.8rem;
    color: var(--font-secundary);
    max-width: 100%;
}

/* Rollen im Verein (nur für eingeloggte Mitglieder sichtbar) */
.profile-roles { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.profile-role {
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    border: 1px solid rgba(77, 33, 235, 0.6);
    background: rgba(77, 33, 235, 0.18);
    color: #c9bdff;
}
