/* =========================================
   CSS Variables (Design System)
   ========================================= */
:root {
    --clr-primary: #1877f2;
    --clr-primary-hover: #166fe5;
    --clr-bg: #f0f2f5;
    --clr-surface: #ffffff;
    --clr-text-main: #050505;
    --clr-text-muted: #65676b;
    --clr-border: #e4e6eb;
    --clr-success: #24d666;
    --clr-overlay: rgba(0, 0, 0, 0.7);
    --font-stack: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
}

body {
    background-color: var(--clr-bg); 
    color: var(--clr-text-main); 
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--clr-surface); 
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 40px;
}

/* =========================================
   Preloader & Animations
   ========================================= */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--clr-surface); 
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 5px solid var(--clr-border);
    border-top-color: var(--clr-primary); 
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(36, 214, 102, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(36, 214, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(36, 214, 102, 0); }
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================
   Header & Banner
   ========================================= */
.banner {
    background: url('images/img1.jpg') no-repeat center center/cover;
    height: 200px;
    position: relative;
}

.top-nav {
    display: flex;
    align-items: center;
    padding: 15px;
    color: var(--clr-surface);
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.top-info {
    text-align: left;
    margin-left: 10px;
}

.top-info h2 {
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.top-info p {
    font-size: 12px;
    margin-top: 3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* =========================================
   Profile Section
   ========================================= */
.profile-section {
    padding: 0 15px;
    position: relative;
}

.profile-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    border-radius: 50%;
    background: var(--clr-surface);
    border: 3px solid var(--clr-surface);
}

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

.online-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background-color: var(--clr-success);
    border: 3px solid var(--clr-surface);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.user-info {
    margin-top: 10px;
}

.user-info h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--clr-text-main);
}

.bio {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--clr-text-main);
}

/* =========================================
   Buttons
   ========================================= */
.btn-primary {
    width: 100%;
    background-color: var(--clr-primary); 
    color: var(--clr-surface);
    border: none;
    border-radius: 30px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, transform 0.1s;
}

.btn-primary i {
    margin-right: 8px;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: var(--clr-primary-hover); 
}

.btn-primary:active {
    transform: scale(0.99);
}

.subscription-box {
    margin-top: 20px;
}

/* =========================================
   Tabs
   ========================================= */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--clr-border);
    margin-top: 20px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: var(--clr-text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* =========================================
   Locked Feed Section
   ========================================= */
.feed-section {
    padding: 30px 20px;
    background-color: var(--clr-bg); 
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 250px;
}

.bg-lock-container {
    margin-bottom: 25px;
    margin-top: 10px;
}

.bg-lock-icon {
    font-size: 75px;
    color: #dadde1;
}

.locked-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    width: 100%;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.locked-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--clr-text-muted);
    font-size: 15px;
}

.locked-media-counts {
    display: flex;
    align-items: center;
}

.locked-media-counts i {
    font-size: 16px;
    margin-right: 6px;
}

.dot {
    margin: 0 10px;
    font-size: 18px;
}

.small-lock {
    font-size: 16px;
    color: var(--clr-text-muted);
}

/* =========================================
   Premium Popup Modal
   ========================================= */
.modal {
    display: none; 
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: var(--clr-overlay); 
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--clr-surface); 
    border: 1px solid var(--clr-border);
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.modal-banner {
    background: url('images/img1.jpg') no-repeat center center/cover;
    height: 125px;
    width: 100%;
}

.modal-inner {
    padding: 0 25px 25px 25px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 34px;
    height: 34px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--clr-surface);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 10;
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -45px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: none;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 4px solid var(--clr-surface);
}

.modal-user-info h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--clr-text-main);
}

.modal-body h3 {
    color: var(--clr-text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    font-size: 15px;
    color: var(--clr-text-main);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.list-check {
    color: var(--clr-primary); 
    font-size: 20px;
    margin-right: 15px;
}

/* =========================================
   Media Queries
   ========================================= */
@media screen and (max-width: 600px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
    }
    body {
        background-color: var(--clr-surface);
    }
}