:root {
    --bg-dark: #0f0f0f; /* Deep black user wanted */
    --card-bg: #1a1a1a; /* slightly lighter black for cards */
    --offer-bg: #141414; /* slightly darker inner card */
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #ff8a3d; /* Base soft orange tone */
    --accent-light: #ffb07c; /* Lighter gradient stop */
    --border: #262626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
}

/* TOP NAV */
.top-nav {
    display: flex;
    justify-content: flex-start; /* Removed right icons, left layout only */
    align-items: center;
    padding: 14px 24px;
    background-color: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-dot {
    color: var(--accent);
}

/* APP WRAPPER */
.app-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 16px 40px 16px;
}

@media(max-width: 600px) {
    .app-wrapper {
        padding: 0 0 40px 0; /* Full width bleeding on mobile */
    }
}

/* HEADER / TITLE BAR */
.user-title-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 16px;
}

.user-title {
    font-size: 15px;
    font-weight: 500;
}

.icon-dots {
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* PROFILE CARD */
.profile-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

@media(max-width: 600px) {
    .profile-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

.banner-container {
    width: 100%;
    aspect-ratio: 3 / 1;
    position: relative;
    background-color: #222;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* Focus on face/torso for vertical selfies */
}

.stats-row {
    position: absolute;
    bottom: -26px;
    right: 16px;
    display: flex;
    gap: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    align-items: center;
}

.stats-row svg {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    vertical-align: text-bottom;
}

/* RESTRUCTURED AVATAR */
.profile-info {
    position: relative;
    padding: 0 16px 20px 16px; 
}

.avatar-container {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    margin-top: -48px; /* Overlap half of its height on the banner */
    margin-bottom: 12px; /* Give room before name */
    position: relative;
    z-index: 2;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%; /* Custom framed for first image face */
}

.name-badge {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.verified-icon {
    width: 18px;
    height: 18px;
}

.username-handle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.bio-container {
    max-height: 38px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
}

.bio-container.expanded {
    max-height: 200px;
}

.bio-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70px;
    height: 19px;
    background: linear-gradient(to right, transparent, var(--card-bg) 80%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bio-container.expanded::after {
    opacity: 0;
}

.bio-text {
    font-size: 13px;
    line-height: 1.4;
    color: #e2e2e2;
    margin: 0;
}

.read-more {
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 12px;
    transition: color 0.2s ease, filter 0.2s ease;
}

.read-more:hover {
    filter: brightness(1.2);
}

.location-row {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.location-row svg {
    width: 14px;
    height: 14px;
}

/* PREMIUM ICONS */
.premium-star-icon {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 6px rgba(255, 138, 61, 0.7));
}

/* OFFER CARD */
.offer-card {
    background-color: var(--offer-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.offer-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.offer-desc-box {
    display: flex;
    gap: 12px;
    align-items: center;
    background-color: var(--card-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.offer-mini-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
}

.offer-desc-box p {
    font-size: 12px;
    color: #cccccc;
    line-height: 1.3;
}

.btn-wrapper {
    position: relative;
    width: 100%;
}

.btn-wrapper:hover .primary-btn {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(255, 138, 61, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.btn-wrapper:active .primary-btn {
    filter: brightness(1.1);
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 138, 61, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.badge-discount {
    position: absolute;
    top: -10px;
    left: 16px;
    background-color: #ffffff;
    color: #0f9d58;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    z-index: 2;
}

.primary-btn {
    width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    color: #000000;
    font-size: 15px;
    font-weight: 700;
    padding: 14px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 138, 61, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.primary-btn:active {
    filter: brightness(1.1);
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 138, 61, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.primary-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(255, 138, 61, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.old-price {
    text-align: right;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-right: 8px;
}

/* SUBSCRIPTIONS */
.subs-section {
    margin-bottom: 16px;
}

.subs-header {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.subs-header svg {
    width: 16px;
    height: 16px;
}

.sub-card {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    color: #000000;
    border-radius: 24px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 138, 61, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.sub-card:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(255, 138, 61, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.sub-card:active {
    filter: brightness(1.1);
    transform: translateY(1px);
}

.premium-badge {
    filter: drop-shadow(0 0 3px rgba(255, 138, 61, 0.6));
}

.sub-price {
    font-weight: 900;
}

/* TABS */
.content-tabs {
    display: flex;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.tab {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.tab svg {
    width: 18px;
    height: 18px;
}

.tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

/* POSTAGENS FEED (SINGLE LOCKED PREVIEW) */
.single-locked-preview {
    width: 100%;
    height: 380px;
    background-color: #1a1a1a; 
    border-radius: 12px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media(max-width: 600px) {
    .single-locked-preview {
        border-radius: 0;
        border-left: none;
        border-right: none;
        height: 320px;
    }
}

.preview-bg {
    position: absolute;
    inset: 0;
    background-image: url('assets/blur_avatar1.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.85);
    transform: scale(1.15);
    z-index: 1;
    transition: transform 0.3s ease;
}

.single-locked-preview:hover .preview-bg {
    transform: scale(1.2);
}

.preview-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15,15,15,0.4) 0%, rgba(15,15,15,0.85) 100%);
    padding: 20px;
}

.preview-lock {
    width: 72px;
    height: 72px;
    color: #ffffff;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.5)); 
    opacity: 0.95;
    transition: transform 0.2s;
}

.single-locked-preview:hover .preview-lock {
    transform: scale(1.05);
}

.preview-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
    letter-spacing: 0.5px;
    opacity: 0.95;
}

/* GRID FEED */
.grid-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

@media(min-width: 601px) {
    .grid-feed {
        grid-template-columns: repeat(4, 1fr);
    }
}

.grid-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--card-bg);
}

.grid-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) brightness(0.95);
    transform: scale(1.15); 
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-bg-img {
    transform: scale(1.2);
}

/* FREE CONTENT OVERRIDES */
.grid-item.free-content .grid-bg-img {
    filter: none;
    transform: scale(1);
}
.grid-item.free-content:hover .grid-bg-img {
    transform: scale(1.05); /* Slight zoom for free items without extreme scale needed to hide edges */
}

/* LIGHT BLUR OVERRIDES */
.grid-item.light-blur .grid-bg-img {
    filter: blur(6px) brightness(0.95);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.grid-item:hover .grid-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.85) 100%);
}

.grid-item.free-content .grid-overlay {
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
}

.grid-lock {
    width: 24px;
    height: 24px;
    color: #ffffff;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.7));
}

.grid-stats {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    gap: 8px;
    color: #ffffff;
    opacity: 0.85;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.grid-stats svg {
    width: 12px;
    height: 12px;
    vertical-align: text-bottom;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    border-top: 1px solid var(--border);
}

@media(min-width: 600px) {
    .modal {
        align-items: center;
    }
    .modal-content {
        border-radius: 20px;
        transform: scale(0.95);
        border-bottom: 1px solid var(--border);
    }
    .modal.active .modal-content {
        transform: scale(1);
    }
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #1f1f1f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

/* PROFILE VIEW MODAL SPECIFICS */
.modal-profile-view {
    padding: 0;
    overflow: hidden;
    max-height: 95vh;
    overflow-y: auto;
    scrollbar-width: none; 
}

.modal-profile-view::-webkit-scrollbar {
    display: none; 
}

.modal-close-overlay {
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
}

.modal-banner-container {
    width: 100%;
    aspect-ratio: 3 / 1;
    background-color: #222;
    position: relative;
}

.modal-profile-info {
    padding: 0 20px 32px 20px;
    position: relative;
}

.modal-profile-info .avatar-container {
    width: 88px;
    height: 88px;
    margin-top: -44px;
    margin-bottom: 12px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

.modal-name-badge {
    font-size: 18px;
}

.modal-handle {
    margin-bottom: 24px;
}

.modal-benefits {
    margin-bottom: 24px;
    width: 100%;
}

.benefits-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #e2e2e2;
    font-weight: 500;
}

.benefits-list svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.checkout-btn {
    margin-bottom: 16px;
    font-size: 16px;
    padding: 16px;
}

.modal-guarantee {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.modal-guarantee svg {
    width: 14px;
    height: 14px;
}

/* IMAGE VIEWER */
#image-viewer-modal {
    background: rgba(5, 5, 5, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.viewer-image {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    user-select: none;
    -webkit-user-drag: none;
}

#image-viewer-modal.active .viewer-image {
    transform: scale(1);
}

.viewer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 1010;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.viewer-close:hover {
    background: rgba(30, 30, 30, 0.9);
}

.viewer-close svg {
    width: 22px;
    height: 22px;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 1010;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.viewer-nav:hover {
    background: rgba(30, 30, 30, 0.9);
}

.viewer-nav svg {
    width: 24px;
    height: 24px;
}

.viewer-prev { left: 24px; }
.viewer-next { right: 24px; }

@media(max-width: 600px) {
    .viewer-nav { display: none; } /* Rely on swipe for mobile */
}
