.page-profile {
    --profile-bg-image: none;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #0b0e14;
    display: flex;
    flex-direction: column;
}

.page-profile::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    background-image: var(--profile-bg-image);
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center;
    filter: blur(10px);
    transform: none;
    opacity: 0.60;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

.page-profile::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, rgba(10, 12, 16, 0.62) 0%, rgba(10, 12, 16, 0.84) 55%, rgba(10, 12, 16, 1) 100%);
    pointer-events: none;
    z-index: 0;
}

.page-profile > .container,
.page-profile > .gp-footer {
    position: relative;
    z-index: 1;
}

.page-profile .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 18px 30px;
    flex: 1;
    width: 100%;
}

.profile-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-2);
}

.profile-aside,
.profile-info {
    position: relative;
    z-index: 1;
}

.avatar-wrapper {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: var(--shadow-2);
}

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

.username {
    font-family: "e-UkraineHead", "e-Ukraine", sans-serif;
    font-size: 36px;
    margin: 0 0 10px 0;
}

.badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 18px;
}

.btn-ghost {
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.action-hint {
    font-size: 12px;
    color: var(--muted);
    align-self: center;
}

.role-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.badge-admin { border-color: rgba(255, 71, 87, 0.6); color: #ff8f9b; }
.badge-editor { border-color: rgba(80, 120, 255, 0.5); color: #9bb2ff; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
}

.profile-about {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: 14px;
    padding: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.7;
}

.profile-counters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 20px;
}

.counter-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.counter-card:hover {
    border-color: rgba(252, 189, 0, 0.5);
}

.counter-value {
    font-size: 18px;
    font-weight: 800;
}

.counter-label {
    font-size: 12px;
    color: var(--muted);
}

.profile-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.social-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.profile-actions-footer {
    justify-content: center;
    margin-top: 10px;
}

.btn-primary,
.btn-danger {
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.btn-primary:hover {
    background: var(--brand);
    color: #111;
    border-color: transparent;
}

.btn-danger {
    border-color: rgba(255, 71, 87, 0.6);
    color: #ff8f9b;
}

.btn-danger:hover {
    background: #ff4757;
    color: #fff;
    border-color: transparent;
}

.user-lists-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.details-card.list-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.list-header h3 {
    margin: 0;
    font-size: 18px;
}

.list-count {
    margin-left: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--muted);
}

.view-all-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.user-games-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 4px;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) rgba(255, 255, 255, 0.04);
}

.reviews-preview {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 4px;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) rgba(255, 255, 255, 0.04);
}

.user-games-grid::-webkit-scrollbar,
.reviews-preview::-webkit-scrollbar {
    height: 8px;
}

.user-games-grid::-webkit-scrollbar-track,
.reviews-preview::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.user-games-grid::-webkit-scrollbar-thumb,
.reviews-preview::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.user-games-grid::-webkit-scrollbar-thumb:hover,
.reviews-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 189, 0, 0.45);
    background-clip: padding-box;
}

.user-game-poster,
.review-poster-card {
    position: relative;
    flex: 0 0 140px;
    aspect-ratio: 2 / 3;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.user-game-poster:hover,
.review-poster-card:hover,
.friend-avatar-card:hover {
    transform: scale(1.03);
    border-color: rgba(252, 189, 0, 0.5);
}

.review-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111;
}

.review-rating {
    color: #fff;
    font-weight: 700;
}

.review-score-badge {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1;
}

.friend-avatar-card {
    flex: 0 0 110px;
    aspect-ratio: 1 / 1;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ug-img,
.fcr-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111;
}

.empty-list {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-3);
    color: var(--text);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease, bottom 0.2s ease;
    pointer-events: none;
    margin-bottom: 6px;
}

.copy-btn.show-tooltip .copy-tooltip {
    opacity: 1;
    bottom: 110%;
}

@media (max-width: 900px) {
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .avatar-wrapper {
        margin: 0 auto;
    }
    .badges-list,
    .profile-socials,
    .actions-row {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .page-profile .container {
        padding: 28px 14px 18px;
    }
    .profile-card {
        padding: 18px;
    }
    .avatar-wrapper {
        width: 220px;
        height: 220px;
    }
    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-counters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .user-lists-section {
        grid-template-columns: 1fr;
    }
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
