.profil-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.profil-card {
    background: #272727;
    border-radius: 1.125rem;
    box-shadow: 0 0.5rem 2rem 0 rgba(0,0,0,0.37);
    padding: 2.5rem;
    width: 100%;
    max-width: 550px;
}

.profil-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #3a3a3a;
}

.profil-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profil-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #06C6A4;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: #06C6A4;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    border: 2px solid #272727;
    transition: background 0.2s;
}

.avatar-upload-btn:hover {
    background: #06b292;
}

.profil-info h2 {
    color: #fff;
    margin: 0 0 0.3rem 0;
    font-size: 1.4rem;
    font-family: 'Roboto', Arial, sans-serif;
}

.profil-email {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0 0 0.3rem 0;
}

.profil-meta {
    color: #666;
    font-size: 0.8rem;
    margin: 0;
}

.profil-badge {
    display: inline-block;
    background: #06C6A4;
    color: #000;
    padding: 0.2rem 0.7rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

.profil-section {
    margin-bottom: 1.5rem;
}

.profil-section h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    font-family: 'Roboto', Arial, sans-serif;
}

.profil-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profil-form input {
    padding: 0.75rem 0.875rem;
    border-radius: 0.5rem;
    border: none;
    background: #494949;
    color: #fff;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 0.08rem 0.35rem rgba(0,0,0,0.35);
    transition: background 0.2s, box-shadow 0.2s;
    font-family: 'Roboto', Arial, sans-serif;
}

.profil-form input::placeholder {
    color: #ABABAB;
}

.profil-form input:focus {
    background: #505050;
    box-shadow: 0 0 0 0.14rem #06C6A4;
}

.profil-form button {
    padding: 0.75rem 0;
    border-radius: 0.5rem;
    border: none;
    background: #06C6A4;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Roboto', Arial, sans-serif;
}

.profil-form button:hover {
    background: #06b292;
}

/* Avatar Upload Popup */
.avatar-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(24,26,32,0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-popup-content {
    background: #272727;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    max-width: 350px;
    width: 90%;
}

.avatar-popup-content h3 {
    color: #fff;
    margin: 0 0 1rem 0;
    font-family: 'Roboto', Arial, sans-serif;
}

.avatar-popup-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #06C6A4;
    margin-bottom: 1.5rem;
}

.avatar-popup-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: #06C6A4;
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
    font-family: 'Roboto', Arial, sans-serif;
}

.avatar-popup-btn:hover {
    background: #06b292;
}

.avatar-popup-cancel {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: #494949;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Roboto', Arial, sans-serif;
}

.avatar-popup-cancel:hover {
    background: #555;
}

@media (max-width: 600px) {
    .profil-header {
        flex-direction: column;
        text-align: center;
    }
    .profil-card {
        padding: 1.5rem;
    }
}

/* === Account-Verknuepfungen === */
.connections-intro {
    color: #bbb;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}
.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}
.connection-card {
    --brand: #5865F2;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    border-radius: 0.6rem;
    background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 0.15s, transform 0.1s;
}
.connection-card:hover { transform: translateY(-1px); }
.connection-card.is-linked {
    border-color: var(--brand);
    background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 16%, transparent), rgba(255,255,255,0.02));
}
.connection-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.connection-icon {
    font-size: 1.4rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: color-mix(in srgb, var(--brand) 22%, transparent);
}
.connection-label {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.6rem;
    font-size: 0.9rem;
}
.connection-status .check { color: #06C6A4; font-weight: 700; }
.connection-name { color: #ddd; font-weight: 500; }
.connection-name-empty { color: #888; font-style: italic; }
.connection-form { margin: 0; }
.btn-connect, .btn-disconnect {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}
.btn-connect {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-connect:hover {
    background: color-mix(in srgb, var(--brand) 85%, white);
}
.btn-disconnect {
    background: transparent;
    border-color: rgba(255,255,255,0.18);
    color: #ccc;
}
.btn-disconnect:hover {
    background: rgba(255,80,80,0.12);
    border-color: rgba(255,80,80,0.5);
    color: #ff9090;
}
