.profiles-page {
    min-height: 100vh;
    background: #000;
    color: #fff;
}

.profiles-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.profiles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: relative !important;
    top: 1rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: min(1280px, calc(100% - 2rem));
    max-width: 1280px;
    z-index: 999;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.profiles-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.profiles-logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.profiles-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.profiles-nav-link {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    border: 1px solid #333;
    background: transparent;
    font-weight: 500;
    transition: all 0.2s;
}

.profiles-nav-link:hover {
    border-color: #4a4a4a;
    background: #151515;
}

.profiles-nav-link.primary {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.profiles-nav-link.primary:hover {
    background: #f0f0f0;
}

.profiles-main {
    padding-top: 8.2rem;
}

.profiles-intro {
    margin-bottom: 2rem;
}

.profiles-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.profiles-subtitle {
    color: #aaa;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.profile-card {
    border: 1px solid #242424;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

.profile-card-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.profile-card-background-image,
.profile-card-background-color,
.profile-card-background-video,
.profile-card-background-overlay {
    position: absolute;
    inset: 0;
}

.profile-card-background-image,
.profile-card-background-color {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.profile-card-background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-background-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.58) 52%, rgba(0, 0, 0, 0.84) 100%);
}

.profile-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.profile-card-avatar-wrap {
    width: 90px;
    height: 90px;
    margin: 0 auto 0.85rem;
    position: relative;
}

.profile-card-avatar-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #2f2f2f;
    background: #1b1b1b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-avatar-fallback {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
}

.profile-card-decoration {
    position: absolute;
    inset: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    object-fit: contain;
    pointer-events: none;
}

.profile-card-name-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 0.3rem;
    width: 100%;
}

.profile-card-name {
    grid-column: 2;
    justify-self: center;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
    word-break: break-word;
}

.profiles-card-badges {
    grid-column: 3;
    justify-self: start;
    margin-left: 0.45rem;
    display: inline-flex;
    gap: 5.5px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    padding: 4px 8px;
    border: 2px solid rgba(255, 255, 255, 0.04);
}

.profiles-card-badge {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profiles-card-badge-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(#ffffff 0 0 2.5px);
}

.profile-card-link {
    text-align: center;
    color: #9f9f9f;
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
}

.profile-card-bio {
    color: #cfcfcf;
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.45;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
}

.profile-card-bio.empty {
    color: #707070;
}

.profile-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #242424;
    padding-top: 0.9rem;
}

.profile-card-views {
    color: #bdbdbd;
    font-size: 0.85rem;
}

.profile-card-btn {
    text-decoration: none;
    color: #000;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s;
}

.profile-card-btn:hover {
    background: #ebebeb;
}

.profiles-pagination {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-number {
    color: #fff;
    border: 1px solid #333;
    background: #121212;
    text-decoration: none;
    padding: 0.48rem 0.75rem;
    border-radius: 8px;
    min-width: 38px;
    text-align: center;
    font-weight: 600;
}

.pagination-number.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.profiles-empty {
    border: 1px solid #242424;
    background: #0f0f0f;
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
}

.profiles-empty h2 {
    margin-bottom: 0.5rem;
}

.profiles-empty p {
    color: #aaa;
    margin-bottom: 1rem;
}

.profiles-empty-btn {
    text-decoration: none;
    background: #fff;
    color: #000;
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    display: inline-block;
    font-weight: 600;
}

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

    .profiles-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
        width: calc(100% - 1rem);
    }
}

@media (max-width: 680px) {
    .profiles-container {
        padding: 0 1rem 3rem;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        min-height: 300px;
    }

    .profile-card-name-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.45rem;
        flex-wrap: wrap;
    }

    .profile-card-name,
    .profiles-card-badges {
        grid-column: auto;
        justify-self: auto;
        margin-left: 0;
    }
}
