.profile-page {
    padding: 20px;
}

.profile-container {
    max-width: 800px;
    margin: 80px auto 0;
}

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-emoji {
    width: 18px;
    height: 18px;
}

.profile-handle {
    font-size: 13px;
    color: #8a96a3;
}

.profile-bio {
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
}

.profile-meta-card {
    background: #0d1117;
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.profile-meta-label {
    font-size: 13px;
    color: #8a96a3;
}

.profile-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: #f3f6fb;
    text-align: right;
}

.profile-moderation-card {
    background: #0d1117;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-moderation-head h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.profile-moderation-head p {
    margin: 0;
    color: #8a96a3;
    line-height: 1.5;
}

.profile-moderation-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #dbe7f3;
    line-height: 1.5;
}

.profile-checkbox input {
    margin-top: 4px;
}

.profile-action-btn {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #162338;
    color: #f3f6fb;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.profile-action-btn:hover {
    transform: translateY(-1px);
}

.profile-action-btn--danger {
    background: linear-gradient(135deg, #4d1217, #7b1e27);
    border-color: rgba(255, 107, 129, 0.25);
}

.profile-action-btn--secondary {
    background: linear-gradient(135deg, #173050, #204674);
    border-color: rgba(84, 150, 255, 0.28);
}

@media (max-width: 700px) {

    .profile-container {
        margin-top: 70px;
    }

    .profile-avatar img {
        width: 60px;
        height: 60px;
    }

    .profile-name {
        font-size: 16px;
    }

    .profile-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .profile-meta-value {
        text-align: left;
    }

    .profile-checkbox {
        align-items: flex-start;
    }
}

.profile-header {
    position: relative;
}

.profile-actions-menu {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 50;
}

.profile-actions-menu__trigger {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #f3f6fb;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.profile-actions-menu__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    padding: 7px;
    border-radius: 14px;
    background: rgba(15, 21, 34, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

.profile-actions-menu__item {
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #f7f9fc;
    text-align: left;
    cursor: pointer;
}

.profile-actions-menu__item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.profile-actions-menu__item--danger {
    color: #ffb4b4;
}

.profile-ban-dialog[hidden] {
    display: none !important;
}

.profile-ban-dialog {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-ban-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 40%),
    rgba(3, 6, 12, 0.82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.profile-ban-dialog__panel {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 24px;
    border-radius: 24px;
    background: rgba(8, 12, 20, 0.58);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.035);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.65),
    0 8px 20px rgba(0, 0, 0, 0.35);
}

.profile-ban-dialog__panel h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
}

.profile-ban-dialog__panel p {
    margin: 0 0 18px;
    color: #8a96a3;
    line-height: 1.55;
}

.profile-ban-dialog__checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #cfd8e3;
    cursor: pointer;
}

.profile-ban-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.profile-ban-dialog__secondary,
.profile-ban-dialog__danger {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.profile-ban-dialog__secondary {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #c4ccd6;
}

.profile-ban-dialog__danger {
    border: 0;
    background: #dc2626;
    color: #fff;
}

.profile-ban-dialog__checkbox input {
    appearance: none;
    -webkit-appearance: none;

    position: relative;
    flex: 0 0 auto;

    width: 20px;
    height: 20px;
    margin: 0;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;

    background: rgba(255, 255, 255, 0.045);

    cursor: pointer;

    transition: background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.profile-ban-dialog__checkbox input:hover {
    border-color: rgba(59, 130, 246, 0.65);
    background: rgba(59, 130, 246, 0.08);
}

.profile-ban-dialog__checkbox input:checked {
    border-color: #3b82f6;
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.profile-ban-dialog__checkbox input:checked::after {
    content: "";

    position: absolute;
    left: 6px;
    top: 3px;

    width: 5px;
    height: 9px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}

.profile-ban-dialog__checkbox input:active {
    transform: scale(0.9);
}

.profile-ban-dialog__checkbox span {
    line-height: 20px;
    user-select: none;
}

.profile-private-card {
    padding: 20px;
    border-radius: 18px;
    background: rgba(13, 17, 23, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-private-card__head {
    margin-bottom: 16px;
}

.profile-private-card__head h2 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #f3f6fb;
}

.profile-private-card__head p {
    margin: 0;
    color: #8a96a3;
    font-size: 13px;
    line-height: 1.5;
}

.profile-private-card__grid {
    display: grid;
    gap: 10px;
}

.profile-private-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-private-row span {
    color: #8a96a3;
    font-size: 13px;
}

.profile-private-row strong {
    color: #f3f6fb;
    font-size: 14px;
    text-align: right;
    word-break: break-word;
}

.profile-messages-dialog[hidden] {
    display: none !important;
}

.profile-messages-dialog {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-messages-dialog__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 40%),
        rgba(3, 6, 12, 0.82);
    backdrop-filter: blur(14px) saturate(140%);
}

.profile-messages-dialog__panel {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: calc(100vh - 60px);
    padding: 24px;
    border-radius: 24px;
    background: rgba(8, 12, 20, 0.58);
    backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.035);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.65);
}

.profile-messages-dialog__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-messages-dialog__header h3 {
    margin: 0;
    color: #fff;
}

.profile-messages-dialog__header p {
    margin: 4px 0 0;
    color: #8a96a3;
}

.profile-messages-dialog__header button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.profile-messages-dialog__list {
    max-height: 520px;
    overflow-y: auto;
    display: grid;
    gap: 10px;
    padding-right: 4px;
}

.profile-message-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-message-item__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-message-item__top strong {
    color: #fff;
    font-size: 13px;
}

.profile-message-item__top span {
    color: #8a96a3;
    font-size: 12px;
}

.profile-message-item__text {
    color: #dbe7f3;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.profile-messages-dialog__loader {
    margin-top: 12px;
    color: #8a96a3;
    text-align: center;
    font-size: 13px;
}
.profile-messages-dialog__list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.profile-messages-dialog__list::-webkit-scrollbar {
    width: 4px;
}

.profile-messages-dialog__list::-webkit-scrollbar-track {
    background: transparent;
}

.profile-messages-dialog__list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.profile-messages-dialog__list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
}