:root {
    /* Color Palette */
    --color-white: #ffffff;
    --color-bg: #f6f5f3;
    --color-orange-light: #f6a45d;
    --color-orange-hover: #ef8b3f;
    --color-text-main: #222222;
    --color-text-secondary: #777777;
    --color-border: #ececec;
    
    /* Layout */
    --max-width-app: 560px;
    --border-radius-card: 20px;
    --border-radius-pill: 9999px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 8px 25px rgba(246, 164, 93, 0.2);
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    
    /* Anti-Copy Protections */
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Evitar drag de imagens */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none; /* Previne clicar com direito na maioria das vezes */
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: var(--font-family);
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

/* Header */
.top-header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: var(--max-width-app);
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: absolute;
    left: 0;
    pointer-events: none;
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.lang-toggle {
    margin-left: auto;
    font-size: 24px;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
    z-index: 2;
}

.lang-toggle:hover {
    color: var(--color-text-main);
}

/* Main Container */
.app-container {
    width: 100%;
    padding: 20px 16px;
}

.main-content {
    max-width: var(--max-width-app);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Profile Card Container */
.profile-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

/* Banner */
.banner {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
}

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

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
}

/* Profile Body */
.profile-body {
    padding: 0 20px 24px 20px;
    position: relative;
}

/* Avatar and Stats Row */
.avatar-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -45px;
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
}

.avatar-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 4px;
    background-color: var(--color-white);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.profile-stats {
    display: flex;
    gap: 12px;
    padding-bottom: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.stat-item i {
    font-size: 16px;
}

/* Profile Info */
.profile-info {
    margin-bottom: 24px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.creator-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.verified-badge {
    color: var(--color-orange-light);
    font-size: 18px;
    display: flex;
    align-items: center;
}

.creator-username {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.creator-bio {
    font-size: 14px;
    color: var(--color-text-main);
    line-height: 1.5;
    margin-bottom: 16px;
}

.read-more {
    color: var(--color-orange-light);
    font-weight: 600;
    font-size: 14px;
    margin-left: 4px;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--color-orange-hover);
}

.extra-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.location i {
    font-size: 16px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    color: var(--color-text-main);
    font-size: 18px;
    background-color: #f6f5f3;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
}

.social-links a:hover {
    background-color: var(--color-border);
    transform: scale(1.05);
}

/* Subscriptions Area */
.subscriptions-area {
    margin-top: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.plan-card {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--border-radius-pill);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-plan {
    background: linear-gradient(to right, #faa55f 0%, #fcb48d 50%, #fcb994 100%);
    color: var(--color-text-main);
    margin-bottom: 24px;
}

.main-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(246, 164, 93, 0.3);
}

.plan-duration {
    font-weight: 600;
    font-size: 15px;
}

.plan-price {
    font-weight: 700;
    font-size: 15px;
}

.promotions-wrapper {
    margin-top: 12px;
}

.promotions-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 12px 0;
    color: var(--color-text-main);
}

.promotions-toggle:hover {
    opacity: 0.8;
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
    color: var(--color-text-secondary);
}

.promotions-wrapper.open .toggle-icon {
    transform: rotate(180deg);
}

.promotions-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.promotions-wrapper.open .promotions-content {
    max-height: 500px;
    transition: max-height 0.4s ease-in-out;
}

.promotions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-plan {
    background: linear-gradient(to right, #faa55f 0%, #fcb48d 50%, #fcb994 100%);
    color: var(--color-text-main);
}

.promo-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(246, 164, 93, 0.3);
}

/* Content Tabs */
.content-tabs {
    display: flex;
    background-color: var(--color-white);
    border-radius: var(--border-radius-pill);
    padding: 4px;
    box-shadow: var(--shadow-soft);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-radius: var(--border-radius-pill);
    transition: all 0.3s ease;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn:hover {
    color: var(--color-text-main);
}

.tab-btn.active {
    background-color: var(--color-white);
    color: var(--color-orange-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 20%;
    width: 60%;
    height: 2px;
    background-color: var(--color-orange-light);
    border-radius: 2px;
    opacity: 0; /* Optional: adds a neat effect if needed */
}

/* Feed Area */
.feed-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.author-name {
    font-weight: 600;
    font-size: 15px;
}

.verified-icon-small {
    color: var(--color-orange-light);
    font-size: 14px;
}

.author-username {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.post-menu-btn {
    font-size: 24px;
    color: var(--color-text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.post-menu-btn:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--color-text-main);
}

.locked-content {
    background-color: rgba(246, 164, 93, 0.05);
    height: 350px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--color-border);
}

/* Simulated blurred background */
.locked-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('banner.png'); /* reusing banner to simulate blurry post */
    background-size: cover;
    background-position: center;
    filter: blur(15px) opacity(0.2);
    z-index: 1;
}

.lock-icon-wrapper {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    color: var(--color-text-main);
    font-size: 28px;
    margin-bottom: 24px;
}

.locked-post-stats {
    position: absolute;
    bottom: 16px;
    z-index: 2;
    display: flex;
    gap: 16px;
    background-color: rgba(255,255,255,0.9);
    padding: 8px 16px;
    border-radius: var(--border-radius-pill);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(4px);
}

.locked-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
}

.locked-stat i {
    font-size: 16px;
    color: var(--color-text-secondary);
}

.bottom-spacer {
    height: 40px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-container {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .profile-stats {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px 12px;
        max-width: 200px;
    }
    
    .avatar-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .avatar-stats-row {
        margin-top: -40px;
    }
}

/* Modal Checkout */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-white);
    width: 90%;
    max-width: 400px;
    border-radius: var(--border-radius-card);
    padding: 24px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 20px;
    color: var(--color-text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    transition: background-color 0.2s;
}

.close-modal:hover {
    background-color: var(--color-border);
    color: var(--color-text-main);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--color-orange-light);
    font-weight: 600;
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* Checkout Form */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.form-group input {
    font-family: var(--font-family);
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #fafafa;
}

.form-group input:focus {
    border-color: var(--color-orange-light);
    background-color: var(--color-white);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(to right, #faa55f 0%, #fcb48d 50%, #fcb994 100%);
    color: var(--color-text-main);
    padding: 14px;
    border-radius: var(--border-radius-pill);
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(246, 164, 93, 0.3);
}

/* Loading Step */
#stepLoading {
    text-align: center;
    padding: 40px 0;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top: 3px solid var(--color-orange-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pix Step */
#stepPix {
    text-align: center;
}

.pix-instructions {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.qrcode-container {
    background-color: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    display: inline-block;
    margin-bottom: 20px;
}

.qrcode-container img {
    margin: 0 auto;
}

.pix-copy-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#pixCodeInput {
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    background-color: #fafafa;
}

.btn-copy {
    width: 100%;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    padding: 12px;
    border-radius: var(--border-radius-pill);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-copy:hover {
    background-color: #e5e5e5;
}
