/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-hover: #222238;
    --accent: #e91e8c;
    --accent-hover: #ff2da0;
    --accent-soft: rgba(233, 30, 140, 0.15);
    --text-primary: #f0f0f0;
    --text-secondary: #8a8aa3;
    --text-muted: #5a5a72;
    --border: #2a2a3e;
    --success: #4caf50;
    --warning: #f5a623;
    --danger: #ff4444;
    --gold: #ffd700;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-width: 240px;
    --content-width: 620px;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

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

/* ===== LAYOUT ===== */
.app {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-item .icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-hover);
    overflow: hidden;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
}

.sidebar-user-handle {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    justify-content: center;
}

.content {
    width: 100%;
    max-width: var(--content-width);
    min-height: 100vh;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.page-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
}

/* ===== PROFILE HEADER ===== */
.profile-banner {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-card), var(--accent-soft));
    overflow: hidden;
    position: relative;
}

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

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

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    border: 4px solid var(--bg-primary);
    overflow: hidden;
    margin-top: -50px;
    background: var(--bg-card);
    position: relative;
}

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

.profile-avatar .online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: var(--success);
    border: 3px solid var(--bg-primary);
    border-radius: var(--radius-full);
}

.profile-name {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-name h2 {
    font-size: 22px;
    font-weight: 700;
}

.profile-name .verified {
    color: var(--accent);
    font-size: 18px;
}

.profile-handle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 2px;
}

.profile-bio {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

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

/* ===== SUBSCRIBE BUTTON ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-soft);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #ffaa00);
    color: #1a1a2e;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.subscribe-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.subscribe-price {
    text-align: center;
    margin-bottom: 12px;
}

.subscribe-price .price {
    font-size: 24px;
    font-weight: 800;
}

.subscribe-price .period {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== FEED / POSTS ===== */
.post {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.post:hover {
    background: rgba(255, 255, 255, 0.02);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 8px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

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

.post-author {
    font-weight: 600;
    font-size: 14px;
}

.post-time {
    color: var(--text-muted);
    font-size: 12px;
}

.post-text {
    padding: 4px 20px 12px;
    font-size: 14px;
    line-height: 1.6;
}

.post-media {
    position: relative;
    overflow: hidden;
}

.post-media img {
    width: 100%;
    display: block;
}

.post-media.locked img {
    filter: blur(20px);
    transform: scale(1.1);
}

.post-media .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    gap: 12px;
}

.lock-overlay .lock-icon {
    font-size: 36px;
}

.lock-overlay .lock-text {
    font-size: 14px;
    font-weight: 600;
}

.post-actions {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    background: none;
    transition: all 0.2s;
}

.post-action:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.post-action.liked {
    color: var(--accent);
}

.post-action.tipped {
    color: var(--gold);
}

/* ===== CHARACTER CARDS (DISCOVER) ===== */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 20px;
}

.char-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.char-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.char-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.char-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.char-card:hover .char-card-img img {
    transform: scale(1.05);
}

.char-card-info {
    padding: 12px;
}

.char-card-name {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.char-card-bio {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.char-card-price {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* ===== CHAT ===== */
.chat-container {
    display: flex;
    height: calc(100vh - 61px);
}

.chat-list {
    width: 320px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.chat-list-item:hover,
.chat-list-item.active {
    background: var(--bg-hover);
}

.chat-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

.chat-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-list-info {
    flex: 1;
    min-width: 0;
}

.chat-list-name {
    font-weight: 600;
    font-size: 14px;
}

.chat-list-preview {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
}

.message.incoming {
    background: var(--bg-card);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.outgoing {
    background: var(--accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.message.outgoing .message-time {
    color: rgba(255, 255, 255, 0.6);
}

.message-ppv {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    max-width: 280px;
    align-self: flex-start;
}

.message-ppv-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.message-ppv-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(15px);
    transform: scale(1.1);
}

.chat-input {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
}

.chat-input input:focus {
    border-color: var(--accent);
}

.chat-input .tip-btn {
    background: none;
    color: var(--gold);
    font-size: 20px;
    padding: 8px;
}

.chat-input .send-btn {
    background: var(--accent);
    color: white;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.chat-input .send-btn:hover {
    background: var(--accent-hover);
}

/* ===== WALLET ===== */
.wallet-balance {
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid var(--border);
}

.wallet-balance .amount {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wallet-balance .label {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.wallet-packs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
}

.wallet-pack {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-pack:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.wallet-pack.popular {
    border-color: var(--gold);
    position: relative;
}

.wallet-pack.popular::before {
    content: 'Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
}

.wallet-pack-credits {
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
}

.wallet-pack-price {
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
}

.wallet-pack-bonus {
    font-size: 12px;
    color: var(--success);
    margin-top: 4px;
}

/* ===== AUTH PAGES ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent), #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

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

.form-group input:focus {
    border-color: var(--accent);
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    background: white;
    color: #333;
    width: 100%;
    font-weight: 600;
}

.btn-google:hover {
    background: #f5f5f5;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== LANDING PAGE ===== */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
}

.landing-nav .logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-nav .nav-links {
    display: flex;
    gap: 16px;
}

.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.landing-hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 700px;
}

.landing-hero h1 span {
    background: linear-gradient(135deg, var(--accent), #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 40px;
}

.landing-hero .cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.landing-featured {
    padding: 60px 40px;
}

.landing-featured h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
        z-index: 100;
        justify-content: space-around;
        padding: 8px 0;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--text-muted);
        font-size: 10px;
        padding: 6px 12px;
    }

    .bottom-nav-item .icon {
        font-size: 20px;
    }

    .bottom-nav-item.active {
        color: var(--accent);
    }

    .content {
        padding-bottom: 70px;
    }

    .landing-hero h1 {
        font-size: 36px;
    }

    .chat-list {
        width: 100%;
    }

    .discover-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }
}

/* Hidden by default on desktop */
.bottom-nav {
    display: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(233, 30, 140, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== FLOATING HEARTS ===== */
@keyframes floatHeart {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: 0.8; transform: translateY(-100px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-200px) scale(0.8); }
}

.floating-heart {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    z-index: 999;
    animation: floatHeart 2s ease-out forwards;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    animation: pulse 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
