*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--cb-text);
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--cb-accent) 18%, transparent), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, .16), transparent 30rem),
        var(--cb-bg);
    font-family: var(--cb-font);
}

button,
input {
    font: inherit;
}

.profile-page {
    width: min(980px, calc(100% - 28px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.profile-card,
.comments-card {
    overflow: hidden;
    background: color-mix(in srgb, var(--cb-surface) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--cb-line) 86%, transparent);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.profile-banner {
    position: relative;
    min-height: 230px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--cb-accent) 42%, transparent), rgba(7, 10, 18, .58)),
        linear-gradient(45deg, rgba(59, 130, 246, .28), transparent),
        url('../img/TEWQ.png') center / min(420px, 70%) no-repeat,
        #10131b;
}

.banner-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 10, 18, .95), transparent 68%);
}

.share-btn {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    color: var(--cb-text);
    background: rgba(7, 10, 18, .68);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.btn-icon,
.stat-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #15171c;
    background: var(--cb-accent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}

.profile-content {
    padding: 0 26px 26px;
}

.profile-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-top: -58px;
}

.avatar {
    width: 118px;
    height: 118px;
    object-fit: cover;
    background: var(--cb-surface-2);
    border: 5px solid var(--cb-surface);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.profile-info {
    min-width: 0;
    padding-bottom: 8px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.name-row h1 {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--cb-text);
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1;
    letter-spacing: 0;
}

.verified {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: #15171c;
    background: var(--cb-accent-2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.character {
    margin: 9px 0 0;
    color: var(--cb-accent);
    font-weight: 800;
}

.character span {
    color: var(--cb-muted);
    font-size: 13px;
    font-weight: 700;
}

.bio {
    max-width: 660px;
    margin: 8px 0 0;
    color: var(--cb-muted);
    line-height: 1.55;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profile-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    color: var(--cb-text);
    background: rgba(255, 255, 255, .055);
    border: 1px solid var(--cb-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.profile-badges .badge-success {
    color: #132018;
    background: var(--cb-accent-2);
    border-color: color-mix(in srgb, var(--cb-accent-2) 70%, white);
}

.profile-badges .badge-gold {
    color: #15171c;
    background: var(--cb-accent);
    border-color: color-mix(in srgb, var(--cb-accent) 70%, white);
}

.profile-badges .badge-info {
    color: #e8f1ff;
    background: rgba(59, 130, 246, .22);
    border-color: rgba(59, 130, 246, .45);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.stat-card {
    min-height: 98px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
    border: 1px solid var(--cb-line);
    border-radius: 14px;
}

.stat-card small {
    color: var(--cb-muted);
    font-weight: 700;
}

.stat-card strong {
    color: var(--cb-text);
    font-size: 22px;
    line-height: 1.1;
}

.stat-card .success {
    color: var(--cb-accent-2);
}

.stat-card .warning {
    color: var(--cb-accent);
}

.reactions {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.reactions form {
    flex: 1;
}

.reactions button {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--cb-text);
    background: var(--cb-surface-2);
    border: 1px solid var(--cb-line);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
}

.reactions button.active,
.reactions button:hover {
    color: #15171c;
    background: var(--cb-accent);
    border-color: color-mix(in srgb, var(--cb-accent) 74%, white);
}

.owner-settings {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--cb-line);
    border-radius: 14px;
}

.owner-settings h2,
.comments-card h2 {
    margin: 0;
    font-size: 19px;
}

.owner-settings p,
.section-title p {
    margin: 5px 0 0;
    color: var(--cb-muted);
    font-size: 14px;
}

.owner-link,
.comment-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    color: #15171c;
    background: var(--cb-accent);
    border: 1px solid color-mix(in srgb, var(--cb-accent) 72%, white);
    border-radius: 10px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.comments-card {
    margin-top: 18px;
    padding: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-title span {
    flex: 0 0 auto;
    padding: 8px 10px;
    color: var(--cb-accent);
    background: color-mix(in srgb, var(--cb-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--cb-accent) 20%, transparent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.comment-box {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--cb-line);
    border-radius: 14px;
}

.comment-box img,
.comment img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 12px;
}

.comment-box input {
    min-width: 0;
    flex: 1;
    color: var(--cb-text);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 14px;
}

.comment-box button {
    cursor: pointer;
}

.comments-list {
    display: grid;
    gap: 10px;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--cb-line);
    border-radius: 14px;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.comment-head strong {
    color: var(--cb-text);
}

.comment-head small,
.empty {
    color: var(--cb-muted);
}

.comment p {
    margin: 0;
    color: #d9e4f7;
    font-size: 14px;
    line-height: 1.5;
}

.comment-actions {
    margin-top: 8px;
}

.report-btn {
    min-height: 30px;
    padding: 5px 9px;
    color: var(--cb-muted);
    background: transparent;
    border: 1px solid var(--cb-line);
    border-radius: 8px;
    cursor: pointer;
}

.empty {
    margin: 0 0 14px;
    padding: 13px;
    background: rgba(255, 255, 255, .025);
    border: 1px dashed var(--cb-line);
    border-radius: 12px;
}

@media (max-width: 820px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .profile-page {
        width: min(100% - 20px, 980px);
        padding-top: 18px;
    }

    .profile-banner {
        min-height: 180px;
    }

    .profile-content {
        padding: 0 16px 18px;
    }

    .profile-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .avatar {
        width: 104px;
        height: 104px;
        border-radius: 20px;
    }

    .name-row {
        justify-content: center;
    }

    .owner-settings,
    .section-title {
        flex-direction: column;
        align-items: stretch;
    }

    .comment-box {
        align-items: center;
    }
}

@media (max-width: 460px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .share-btn {
        top: 12px;
        right: 12px;
        min-height: 38px;
        padding: 8px 11px;
    }

    .comment-box {
        flex-wrap: wrap;
    }

    .comment-box input {
        flex-basis: calc(100% - 52px);
    }

    .comment-box button {
        width: 100%;
    }
}
