/* ===== Public profile page ===== */

body.page-profile {
    background: #06040a;
}

body.page-profile .site-content {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1199px) {
    body.page-profile .main-footer {
        display: none;
    }
}

.prof-page {
    --prof-accent: #ff5a7a;
    --prof-accent-2: #bc13fe;
    --prof-card: rgba(22, 14, 34, 0.96);
    --prof-border: rgba(255, 255, 255, 0.08);
    --prof-text: #f7f4fb;
    --prof-muted: rgba(255, 255, 255, 0.52);
    --prof-good: #34d399;
    --prof-warn: #fbbf24;
    --prof-danger: #f87171;
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 12px calc(24px + var(--bottom-nav-h, 62px) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1200px) {
    .prof-page {
        padding: 16px 16px 48px;
    }
}

.prof-page * {
    box-sizing: border-box;
}

.prof-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.prof-top__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--prof-muted);
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--prof-border);
}

.prof-top__back:hover {
    color: #fff;
}

.prof-top__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.prof-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--prof-border);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: 0.15s ease;
}

.prof-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.prof-btn--primary {
    border: none;
    background: linear-gradient(135deg, var(--prof-accent), var(--prof-accent-2));
    box-shadow: 0 8px 22px rgba(255, 90, 122, 0.2);
}

.prof-flash {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
}

.prof-flash.success {
    color: var(--prof-good);
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.28);
}

.prof-flash.error {
    color: var(--prof-danger);
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.28);
}

.prof-hero {
    padding: 18px 16px 16px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 90, 122, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(188, 19, 254, 0.14) 0%, transparent 48%),
        linear-gradient(160deg, rgba(36, 20, 56, 0.98) 0%, rgba(16, 8, 28, 0.98) 100%);
    border: 1px solid var(--prof-border);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.prof-hero__main {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.prof-avatar {
    width: 88px;
    height: 88px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5a7a, #bc13fe, #ffc947);
    flex-shrink: 0;
}

.prof-avatar__inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #12081e;
    border: 3px solid #12081e;
}

.prof-avatar__inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prof-avatar__letter {
    font-size: 34px;
    font-weight: 900;
    color: #fff;
}

.prof-hero__meta {
    min-width: 0;
}

.prof-hero__name {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.prof-hero__slug {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--prof-muted);
    font-weight: 700;
}

.prof-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.prof-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prof-badge--vip {
    color: #1a1200;
    background: linear-gradient(135deg, #ffe082, #ffb300);
    border-color: transparent;
}

.prof-badge--warn {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.28);
}

.prof-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.prof-stat {
    padding: 10px 8px;
    border-radius: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.prof-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.prof-stat span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--prof-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prof-bio {
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.prof-bio__headline {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: #eee8ff;
}

.prof-bio__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--prof-muted);
}

.prof-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.prof-meta {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #dcd6ec;
    background: rgba(255, 255, 255, 0.05);
}

.prof-link-box {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.prof-link-box__label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--prof-muted);
}

.prof-link-row {
    display: flex;
    gap: 8px;
}

.prof-link-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 12px;
    outline: none;
}

.prof-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.prof-warning {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    font-size: 12px;
    line-height: 1.45;
    color: var(--prof-muted);
}

.prof-warning b {
    color: #fff;
}

.prof-tabs {
    display: flex;
    gap: 6px;
    margin: 14px 0;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--prof-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.prof-tabs::-webkit-scrollbar {
    display: none;
}

.prof-tab {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--prof-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    transition: 0.15s ease;
}

.prof-tab:hover,
.prof-tab.active {
    color: #fff;
    background: rgba(255, 90, 122, 0.12);
}

.prof-section {
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--prof-card);
    border: 1px solid var(--prof-border);
}

.prof-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.prof-section__title {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

.prof-section__sub {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--prof-muted);
}

.prof-counter {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.prof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 560px) {
    .prof-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.prof-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: #12081e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.18s ease;
}

.prof-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 90, 122, 0.35);
}

.prof-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prof-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 55%);
}

.prof-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    z-index: 1;
}

.prof-card__title {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prof-card__meta {
    margin-top: 4px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prof-contacts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 560px) {
    .prof-contacts {
        grid-template-columns: repeat(2, 1fr);
    }
}

.prof-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.15s ease;
    overflow: hidden;
}

.prof-contact:hover {
    border-color: rgba(255, 90, 122, 0.28);
    background: rgba(255, 255, 255, 0.06);
}

.prof-contact__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    background: rgba(255, 90, 122, 0.12);
    color: #ff8fa8;
}

.prof-contact strong {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--prof-muted);
}

.prof-contact span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prof-empty {
    text-align: center;
    padding: 32px 16px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: var(--prof-muted);
}

.prof-empty b {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    color: #fff;
}

.prof-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

.prof-modal {
    width: min(440px, 100%);
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(36, 20, 56, 0.98), rgba(16, 8, 28, 0.98));
    border: 1px solid var(--prof-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.prof-modal h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
}

.prof-modal p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--prof-muted);
}

.prof-modal textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.prof-modal textarea:focus {
    border-color: rgba(255, 90, 122, 0.4);
}

.prof-modal__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.prof-modal__actions .prof-btn {
    flex: 1;
}

.prof-modal--center {
    text-align: center;
}

@media (max-width: 560px) {
    .prof-hero__main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .prof-avatar {
        margin: 0 auto;
    }

    .prof-badges,
    .prof-actions {
        justify-content: center;
    }

    .prof-link-row {
        flex-direction: column;
    }

    .prof-modal__actions {
        flex-direction: column;
    }
}
