/* OnlyVIPs — Modern creator SaaS UI */

:root {
    --bg: #0a0a0f;
    --bg-elevated: #12121a;
    --bg-card: #16161f;
    --border: #2a2a3a;
    --text: #f0f0f5;
    --text-muted: #8888a0;
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-glow: rgba(124, 58, 237, 0.35);
    --accent: #ec4899;
    --success: #10b981;
    --error: #ef4444;
    --stripe: #635bff;
    --paypal: #0070ba;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }

.nav-user { display: flex; align-items: center; gap: 0.75rem; }
.user-name { font-size: 0.875rem; color: var(--text-muted); }

.nav-messages { position: relative; }

.badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    min-width: 1.25rem;
    text-align: center;
}

.badge.sm { font-size: 0.65rem; padding: 0.1rem 0.35rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #9333ea);
    color: white;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--primary-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }

.btn-danger { background: var(--error); color: white; }
.btn-stripe { background: var(--stripe); color: white; }
.btn-paypal { background: var(--paypal); color: white; }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Alerts */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem auto;
    font-size: 0.9rem;
}

.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid var(--success); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--error); color: var(--error); }

/* Hero */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    overflow: hidden;
}

.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

/* Sections */
.section { padding: 4rem 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 { font-size: 1.5rem; font-weight: 700; }

.link { color: var(--primary); font-weight: 500; }

.page-sub { color: var(--text-muted); margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* Creator grid */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.creator-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
    color: var(--text);
}

.creator-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--text);
}

.creator-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.creator-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.creator-bio { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.creator-meta { font-size: 0.8rem; color: var(--primary); }

/* Features */
.features-section h2 { margin-bottom: 2.5rem; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.875rem; }

/* Auth */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.auth-sub { color: var(--text-muted); margin-bottom: 1.75rem; font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }

.demo-credentials {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-toggle { display: flex; gap: 0.75rem; }

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input { display: none; }

.role-option span {
    display: block;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.role-option input:checked + span {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row { display: flex; gap: 1rem; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.inline-form { display: inline; }

/* Dashboard */
.dashboard-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: sticky;
    top: 80px;
}

.sidebar-link {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-link:hover { background: var(--bg-card); color: var(--text); }

.dashboard-main { flex: 1; min-width: 0; }
.dashboard-main h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-muted); font-weight: 500; }

.action-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.tier-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.tier-0 { background: rgba(136, 136, 160, 0.2); color: var(--text-muted); }
.tier-1 { background: rgba(180, 83, 9, 0.2); color: #fbbf24; }
.tier-2 { background: rgba(107, 114, 128, 0.3); color: #d1d5db; }
.tier-3 { background: rgba(234, 179, 8, 0.2); color: #fde047; }

/* Plans */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.plan-free { border-color: rgba(136, 136, 160, 0.3); }
.plan-tier { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.plan-price { font-size: 1.5rem; font-weight: 800; margin: 0.5rem 0; }
.plan-desc { color: var(--text-muted); font-size: 0.85rem; }
.plan-locked { font-size: 0.8rem; margin-top: 0.75rem; }

.info-card { background: var(--bg-elevated); }
.info-card h3 { margin-bottom: 0.75rem; font-size: 0.95rem; }
.info-card ul, .info-card ol { padding-left: 1.25rem; color: var(--text-muted); font-size: 0.875rem; }
.info-card li { margin-bottom: 0.35rem; }

/* Payment cards */
.payment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.payment-card .payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.payment-logo { font-weight: 800; font-size: 1.25rem; }
.stripe-logo { color: var(--stripe); }
.paypal-logo { color: var(--paypal); }

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
}

.status-connected { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-disconnected { background: rgba(136, 136, 160, 0.15); color: var(--text-muted); }

.connected-info { margin: 1rem 0; font-size: 0.875rem; }
.connected-info code { background: var(--bg-elevated); padding: 0.2rem 0.5rem; border-radius: 4px; }

/* Posts list */
.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-item {
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.post-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.post-item-header h3 { font-size: 1rem; }
.post-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

/* Creator profile */
.creator-profile-page { padding-bottom: 3rem; }

.creator-banner {
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, var(--primary) 50%, var(--accent) 100%);
    position: relative;
}

.creator-profile-content { margin-top: -48px; position: relative; z-index: 1; }

.creator-profile-header {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.creator-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 4px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.creator-profile-info { flex: 1; padding-top: 48px; }
.creator-profile-info h1 { font-size: 1.75rem; }
.creator-handle { color: var(--text-muted); font-size: 0.9rem; }
.creator-profile-bio { margin-top: 0.5rem; color: var(--text-muted); max-width: 500px; }

.creator-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

.creator-sidebar h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.current-plan {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.subscribe-plans { display: flex; flex-direction: column; gap: 0.75rem; }

.subscribe-plan {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.subscribe-plan.active { border-color: var(--primary); }

.subscribe-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.subscribe-price { font-weight: 700; font-size: 0.9rem; }
.subscribe-plan p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.payment-buttons { display: flex; flex-direction: column; gap: 0.5rem; }
.subscribed-label { color: var(--success); font-size: 0.85rem; font-weight: 600; }

.creator-posts h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.feed-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.feed-post.locked { min-height: 160px; }

.feed-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.feed-post h3 { margin-bottom: 0.75rem; }
.feed-post-content { color: var(--text-muted); font-size: 0.9rem; }

.feed-post-media { margin-top: 1rem; border-radius: var(--radius-sm); overflow: hidden; }
.feed-post-media img, .feed-post-media video { max-width: 100%; display: block; }

.locked-content {
    text-align: center;
    padding: 2rem 1rem;
}

.lock-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.locked-content h3 { margin-bottom: 0.5rem; }
.locked-content p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }

/* Messages */
.messages-page { padding: 2rem 1.5rem; max-width: 1000px; }
.messages-page h1 { margin-bottom: 1.5rem; }

.conversation-list { display: flex; flex-direction: column; gap: 0.5rem; }

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: all 0.2s;
}

.conversation-item:hover { border-color: var(--primary); color: var(--text); }
.conversation-item.compact { padding: 0.65rem 0.85rem; font-size: 0.875rem; }
.conversation-item.active { background: rgba(124, 58, 237, 0.1); border-color: var(--primary); }

.conversation-info { flex: 1; min-width: 0; }
.conversation-top { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
.conversation-preview { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.conversation-avatar.sm { width: 32px; height: 32px; font-size: 0.8rem; }

.chat-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.chat-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-y: auto;
}

.chat-sidebar h3 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--text-muted); }

.chat-main {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #9333ea);
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-time { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 0.35rem; }

.chat-input-form {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.chat-input-form input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    color: var(--text);
    font-family: var(--font);
}

.chat-input-form input:focus { outline: none; border-color: var(--primary); }

.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

.profile-url code {
    background: var(--bg-elevated);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    .dashboard-sidebar { width: 100%; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .creator-layout { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 1fr; height: auto; }
    .chat-sidebar { display: none; }
    .form-row { flex-direction: column; }
    .nav-links a:not(.btn) { display: none; }
}
