.profile-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background:
        radial-gradient(circle at top right, rgba(47,123,255,.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(var(--fp-brand-rgb),.13), transparent 35%),
        #07111f;
}

.profile-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: rgba(255,255,255,.055);
    border-left: 1px solid rgba(255,255,255,.09);
    backdrop-filter: blur(24px);
}

.profile-side-brand {
    direction: ltr;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 30px;
}

.profile-side-brand span {
    color: #ff4d67;
    text-shadow: 0 0 16px rgba(255,77,103,.6);
}

.profile-side-brand b {
    color: #57a1ff;
    text-shadow: 0 0 16px rgba(87,161,255,.6);
}

.profile-side-brand small {
    display: block;
    direction: rtl;
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 6px;
}

.profile-nav {
    display: grid;
    gap: 11px;
}

.profile-nav a {
    position: relative;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--text-main);
    transition: .25s;
}

.profile-nav a:hover {
    background: rgba(47,123,255,.16);
    border-color: rgba(87,161,255,.35);
    transform: translateX(-2px);
}

.profile-nav a.danger {
    color: #ff9aaa;
}

.profile-nav em {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--fp-brand);
    color: white;
    font-style: normal;
    font-size: 12px;
}

.profile-main {
    padding: 34px;
    min-width: 0;
}

.profile-hero-card,
.profile-form-card,
.profile-empty-box,
.profile-stats-grid > div,
.notification-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(24px);
    box-shadow: 0 22px 70px rgba(0,0,0,.28);
}

.profile-hero-card {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 22px;
    border-radius: 30px;
    margin-bottom: 22px;
}

.profile-avatar-wrap img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}

.profile-name-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-name-line h1 {
    margin: 0;
    font-size: 30px;
}

.profile-hero-info p {
    margin: 7px 0 14px;
    color: var(--text-soft);
    direction: ltr;
    text-align: right;
}

.vip-crown {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(250,204,21,.15);
    border: 1px solid rgba(250,204,21,.35);
    color: #fde68a;
    font-weight: 900;
    font-size: 12px;
}

.profile-social-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-social-stats span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
}

.profile-social-stats strong {
    color: white;
}

.profile-completion-ring {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 32px;
    background: rgba(47,123,255,.13);
    border: 1px solid rgba(87,161,255,.26);
}

.profile-completion-ring strong {
    font-size: 28px;
}

.profile-completion-ring span {
    color: var(--text-soft);
    font-size: 12px;
}

.profile-alert {
    padding: 13px 15px;
    border-radius: 16px;
    margin-bottom: 18px;
    line-height: 1.8;
}

.profile-alert.success {
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.28);
    color: #baffcf;
}

.profile-alert.error {
    background: rgba(255,48,79,.12);
    border: 1px solid rgba(255,48,79,.28);
    color: #ffd5db;
}

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

.profile-stats-grid > div {
    padding: 18px;
    border-radius: 22px;
}

.profile-stats-grid span {
    display: block;
    color: var(--text-soft);
    margin-bottom: 8px;
    font-size: 13px;
}

.profile-stats-grid strong {
    font-size: 30px;
}

.profile-form-card {
    padding: 22px;
    border-radius: 30px;
}

.profile-section-head {
    margin-bottom: 20px;
}

.profile-section-head h2,
.profile-page-head h1 {
    margin: 0 0 8px;
}

.profile-section-head p,
.profile-page-head p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-soft);
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: none;
    outline: none;
    color: white;
    border-radius: 15px;
    padding: 13px 14px;
    background: rgba(0,0,0,.2);
    border: 1px solid rgba(255,255,255,.11);
}

.form-group select option {
    color: #111;
}

.form-group textarea {
    resize: vertical;
    line-height: 1.9;
}

.profile-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(0,0,0,.14);
    border: 1px solid rgba(255,255,255,.1);
}

.profile-checks label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: white;
    cursor: pointer;
}

.profile-primary-btn,
.profile-secondary-btn {
    min-height: 44px;
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 15px;
    padding: 0 18px;
    color: white;
    font-weight: 900;
    cursor: pointer;
}

.profile-primary-btn {
    background: linear-gradient(135deg, #1f6fff, #3d95ff);
    box-shadow: 0 12px 30px rgba(47,123,255,.25);
}

.profile-secondary-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
}

.profile-page-head {
    margin-bottom: 22px;
}

.profile-page-head.with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.profile-movie-grid,
.profile-public-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px 16px;
}

.profile-movie-grid .movie-card-pro,
.profile-public-list .movie-card-pro {
    width: 100%;
    flex: none;
}

.profile-empty-box {
    padding: 28px;
    border-radius: 26px;
    text-align: center;
    color: var(--text-soft);
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    display: block;
    padding: 16px;
    border-radius: 22px;
}

.notification-card.unread {
    border-color: rgba(87,161,255,.36);
    background: rgba(47,123,255,.1);
}

.notification-card strong {
    display: block;
    margin-bottom: 7px;
}

.notification-card p {
    margin: 0 0 8px;
    color: var(--text-soft);
    line-height: 1.9;
}

.notification-card span {
    color: rgba(255,255,255,.46);
    font-size: 12px;
}

.public-watch-item {
    position: relative;
}

.public-watch-item form {
    margin-top: 8px;
}

.public-watch-item button {
    width: 100%;
    min-height: 38px;
    border: none;
    border-radius: 13px;
    color: #ffd5db;
    background: rgba(var(--fp-brand-rgb),.12);
    border: 1px solid rgba(var(--fp-brand-rgb),.24);
    cursor: pointer;
}

@media (max-width: 1000px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
        height: auto;
    }

    .profile-main {
        padding: 18px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-movie-grid,
    .profile-public-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .profile-hero-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar-wrap {
        margin: auto;
    }

    .profile-hero-info p {
        text-align: center;
    }

    .profile-social-stats {
        justify-content: center;
    }

    .profile-completion-ring {
        margin: auto;
    }

    .profile-movie-grid,
    .profile-public-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-page-head.with-action {
        display: grid;
    }
}
.profile-social-page {
    min-height: 100vh;
    padding: 104px 18px 60px;
    background:
        radial-gradient(circle at top right, rgba(47,123,255,.20), transparent 34%),
        radial-gradient(circle at bottom left, rgba(var(--fp-brand-rgb),.14), transparent 36%),
        #07111f;
}

.profile-social-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.profile-insta-hero {
    position: relative;
    display: grid;
    grid-template-columns: 178px 1fr 150px;
    gap: 26px;
    align-items: center;
    padding: 28px;
    border-radius: 38px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.055));
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(28px);
    box-shadow: 0 28px 100px rgba(0,0,0,.38);
}

.profile-cover-glow {
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 20% 30%, rgba(var(--fp-brand-rgb),.18), transparent 26%),
        radial-gradient(circle at 75% 20%, rgba(47,123,255,.24), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(250,204,21,.10), transparent 28%);
    filter: blur(12px);
    opacity: .9;
    pointer-events: none;
}

.profile-avatar-zone,
.profile-main-identity,
.profile-completion-card {
    position: relative;
    z-index: 2;
}

.profile-avatar-zone {
    width: 178px;
    height: 178px;
}

.profile-avatar-ring {
    width: 178px;
    height: 178px;
    padding: 5px;
    border-radius: 52px;
    background:
        linear-gradient(135deg, #1f6fff, var(--fp-brand), #facc15);
    box-shadow: 0 18px 60px rgba(0,0,0,.34);
}

.profile-avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 47px;
    background: rgba(255,255,255,.08);
    border: 4px solid rgba(7,17,31,.95);
}

.profile-avatar-add {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 18px;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, #1f6fff, #3d95ff);
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 14px 38px rgba(47,123,255,.35);
}

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

.profile-name-row h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -1px;
}

.private-badge.public {
    color: #baffcf;
    background: rgba(34,197,94,.13);
    border-color: rgba(34,197,94,.28);
}

.profile-username {
    margin: 6px 0 12px;
    direction: ltr;
    text-align: right;
    color: var(--text-soft);
}

.profile-bio-text {
    max-width: 700px;
    margin: 0;
    color: #dbe7f4;
    line-height: 2;
}

.profile-bio-text.muted {
    color: rgba(255,255,255,.48);
}

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

.profile-primary-action,
.profile-secondary-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 16px;
    padding: 0 16px;
    color: white;
    cursor: pointer;
    font-weight: 900;
}

.profile-primary-action {
    background: linear-gradient(135deg, #1f6fff, #3d95ff);
    box-shadow: 0 14px 34px rgba(47,123,255,.28);
}

.profile-secondary-action {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.13);
}

.profile-completion-card {
    min-height: 128px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border-radius: 28px;
    text-align: center;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.10);
}

.profile-completion-card strong {
    font-size: 36px;
}

.profile-completion-card span {
    color: var(--text-soft);
    font-size: 12px;
}

.profile-completion-card div {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.profile-completion-card i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f6fff, var(--fp-brand));
}

.profile-stats-strip {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.profile-stats-strip a {
    min-height: 92px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 13px;
    border-radius: 24px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.11);
    backdrop-filter: blur(24px);
}

.profile-stats-strip strong {
    color: white;
    font-size: 28px;
}

.profile-stats-strip span {
    color: var(--text-soft);
    font-size: 12px;
}

.profile-pinned-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: 26px;
    background: rgba(250,204,21,.10);
    border: 1px solid rgba(250,204,21,.25);
}

.profile-pinned-box strong {
    color: #fde68a;
}

.profile-pinned-box p {
    margin: 5px 0 0;
    color: var(--text-soft);
}

.profile-pinned-box a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 14px;
    color: white;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.13);
}

.profile-tabs-shell {
    padding: 18px;
    border-radius: 32px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(26px);
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.profile-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.profile-tabs button {
    min-height: 42px;
    border: none;
    border-radius: 15px;
    padding: 0 14px;
    color: var(--text-soft);
    cursor: pointer;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.08);
    font-weight: 900;
}

.profile-tabs button.active {
    color: white;
    background: linear-gradient(135deg, rgba(47,123,255,.85), rgba(61,149,255,.48));
    border-color: rgba(87,161,255,.35);
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-movie-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.profile-fav-actors {
    margin-top: 18px;
}

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

.profile-mini-card,
.profile-about-card {
    background: rgba(0,0,0,.16);
    border: 1px solid rgba(255,255,255,.09);
}

.profile-mini-card {
    padding: 16px;
    border-radius: 24px;
}

.profile-mini-card h3 {
    margin: 0 0 12px;
}

.profile-mini-card p {
    color: var(--text-soft);
}

.profile-mini-list {
    display: grid;
    gap: 9px;
}

.profile-mini-list a {
    padding: 10px;
    border-radius: 14px;
    color: white;
    background: rgba(255,255,255,.06);
}

.profile-about-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
}

.profile-about-card div {
    padding: 13px;
    border-radius: 18px;
    background: rgba(255,255,255,.055);
}

.profile-about-card span {
    display: block;
    color: var(--text-soft);
    margin-bottom: 6px;
    font-size: 12px;
}

.profile-about-card strong {
    color: white;
}

.profile-empty-box.mini {
    margin-top: 12px;
}

.profile-settings-open {
    overflow: hidden;
}

.profile-settings-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
}

.profile-settings-drawer.open {
    display: block;
}

.profile-settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.62);
    backdrop-filter: blur(8px);
}

.profile-settings-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: min(94vw, 520px);
    height: 100%;
    overflow-y: auto;
    padding: 22px;
    background:
        radial-gradient(circle at top left, rgba(47,123,255,.20), transparent 32%),
        #07111f;
    border-right: 1px solid rgba(255,255,255,.12);
    box-shadow: 20px 0 90px rgba(0,0,0,.45);
    animation: settingsSlideIn .28s ease;
}

@keyframes settingsSlideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.settings-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.settings-panel-head span {
    display: block;
    color: #79b4ff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.3px;
    margin-bottom: 5px;
}

.settings-panel-head h2 {
    margin: 0;
}

.settings-panel-head button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    background: rgba(255,255,255,.09);
    font-size: 26px;
}

.settings-avatar-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    margin-bottom: 16px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
}

.settings-avatar-row img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 28px;
}

.settings-avatar-row button {
    min-height: 40px;
    border: none;
    border-radius: 14px;
    padding: 0 13px;
    color: white;
    cursor: pointer;
    background: rgba(47,123,255,.22);
    border: 1px solid rgba(87,161,255,.34);
    font-weight: 900;
}

.settings-avatar-row p {
    color: var(--text-soft);
    margin: 8px 0 0;
    font-size: 12px;
}

.profile-settings-form .form-group {
    margin-bottom: 14px;
}

.profile-settings-form label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 13px;
}

.profile-settings-form input,
.profile-settings-form textarea,
.profile-settings-form select {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 16px;
    color: white;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.11);
    padding: 12px 13px;
}

.profile-settings-form select option {
    color: #111;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.settings-genre-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(0,0,0,.16);
    border: 1px solid rgba(255,255,255,.08);
}

.settings-genre-cloud label {
    margin: 0;
    cursor: pointer;
}

.settings-genre-cloud input {
    display: none;
}

.settings-genre-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.09);
    font-size: 12px;
}

.settings-genre-cloud input:checked + span {
    color: #cfe5ff;
    background: rgba(47,123,255,.16);
    border-color: rgba(87,161,255,.34);
}

.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

@media (max-width: 1100px) {
    .profile-insta-hero {
        grid-template-columns: 150px 1fr;
    }

    .profile-completion-card {
        grid-column: 1 / -1;
    }

    .profile-stats-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .profile-movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .profile-social-page {
        padding: 90px 12px 44px;
    }

    .profile-insta-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar-zone {
        margin: auto;
    }

    .profile-name-row,
    .profile-social-actions {
        justify-content: center;
    }

    .profile-username {
        text-align: center;
    }

    .profile-stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-two-columns,
    .profile-about-card,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .profile-settings-panel {
        width: 100%;
    }
}

/* Standalone profile subpages (no legacy sidebar menu) */
.fp-profile-subpage {
    min-height: 100vh;
    padding: clamp(18px, 3vw, 28px);
    background:
        radial-gradient(circle at top right, rgba(47, 123, 255, .18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(var(--fp-brand-rgb), .13), transparent 35%),
        #07111f;
}

.fp-profile-subpage .profile-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
}

.fp-profile-subpage-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.fp-profile-subpage-back {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .14), transparent 34%),
        rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .12);
}

@media (max-width: 620px) {
    .fp-profile-subpage-head {
        flex-direction: column;
        align-items: stretch;
    }

    .fp-profile-subpage-back {
        width: fit-content;
    }
}
