/* ============================================================
   NarasiAI - Main Stylesheet
   Modern AI Writing Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #6C3CE1;
    --primary-light: #8B5CF6;
    --primary-dark: #5B21B6;
    --secondary: #FF6B35;
    --secondary-light: #FF8A5C;
    --accent: #06D6A0;
    --accent-dark: #05B384;
    --dark: #F5F7FA;
    --dark-card: #FFFFFF;
    --dark-surface: #F0F4F8;
    --dark-border: #E2E8F0;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;
    --info: #3B82F6;
    --gradient-primary: linear-gradient(135deg, #6C3CE1, #FF6B35);
    --gradient-hero: linear-gradient(135deg, #F0ECFF 0%, #E8E0FF 40%, #F5F0FF 100%);
    --gradient-card: linear-gradient(145deg, rgba(108,60,225,0.04), rgba(255,107,53,0.02));
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(108,60,225,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
    background: var(--dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F5F7FA; }
::-webkit-scrollbar-thumb { background: #C7D2FE; border-radius: 3px; }

/* === ANIMATIONS === */
@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideInLeft { from { opacity:0; transform:translateX(-30px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideInRight { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }
@keyframes pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.05); } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }
@keyframes glow { 0%,100% { box-shadow:0 0 20px rgba(108,60,225,0.3); } 50% { box-shadow:0 0 40px rgba(108,60,225,0.6); } }
@keyframes gradientShift { 0% { background-position:0% 50%; } 50% { background-position:100% 50%; } 100% { background-position:0% 50%; } }
@keyframes typing { from { width:0; } to { width:100%; } }
@keyframes blink { 50% { border-color:transparent; } }
@keyframes orbit { from { transform:rotate(0deg) translateX(120px) rotate(0deg); } to { transform:rotate(360deg) translateX(120px) rotate(-360deg); } }

.animate-fade { animation: fadeInUp 0.6s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* === NAVIGATION === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.8);
    transition: var(--transition);
}
.navbar.scrolled { padding: 10px 0; background: rgba(255,255,255,0.95); box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
.nav-container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; font-weight: 800; font-size: 24px;
}
.nav-logo .logo-icon {
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
}
.nav-logo span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
    text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: var(--transition); position: relative;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a::after {
    content:''; position:absolute; bottom:-4px; left:0; width:0; height:2px;
    background:var(--gradient-primary); transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-burger { display:none; cursor:pointer; background:none; border:none; color:var(--text-primary); font-size:24px; }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-full); font-weight: 600; font-size: 14px;
    text-decoration: none; cursor: pointer; border: none; transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: var(--gradient-primary); color: #fff;
    background-size: 200% 200%; animation: gradientShift 3s ease infinite;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-outline {
    background: transparent; color: var(--text-primary);
    border: 1.5px solid var(--dark-border);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(108,60,225,0.1); }
.btn-ghost { background:transparent; color:var(--primary); }
.btn-ghost:hover { background:rgba(108,60,225,0.1); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-danger { background:var(--danger); color:#fff; }
.btn-success { background:var(--success); color:#fff; }
.btn-warning { background:var(--warning); color:#000; }
.btn-block { width: 100%; }

/* === HERO === */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    background: var(--gradient-hero); position: relative; overflow: hidden;
    padding: 120px 24px 80px;
}
.hero::before {
    content:''; position:absolute; top:-50%; right:-30%; width:800px; height:800px;
    background: radial-gradient(circle, rgba(108,60,225,0.08), transparent 70%);
    animation: float 8s ease-in-out infinite;
}
.hero::after {
    content:''; position:absolute; bottom:-20%; left:-20%; width:600px; height:600px;
    background: radial-gradient(circle, rgba(255,107,53,0.06), transparent 70%);
    animation: float 6s ease-in-out infinite reverse;
}
.hero-grid { position:absolute; inset:0; opacity:0.06;
    background-image: linear-gradient(rgba(108,60,225,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,60,225,.12) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-container {
    max-width: 1280px; margin: 0 auto; width: 100%;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
    position: relative; z-index: 2;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: var(--radius-full);
    background: rgba(108,60,225,0.15); border: 1px solid rgba(108,60,225,0.3);
    font-size: 13px; color: var(--primary-light); margin-bottom: 24px;
}
.hero-badge .dot { width:8px; height:8px; border-radius:50%; background:var(--accent); animation:pulse 2s infinite; }
.hero h1 {
    font-size: clamp(36px, 5vw, 56px); font-weight: 800; line-height: 1.15;
    margin-bottom: 20px; letter-spacing: -1px;
}
.hero h1 .highlight {
    background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-size: 200% 200%; animation: gradientShift 3s ease infinite;
}
.hero p { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; }
.hero-stat h3 { font-size: 28px; font-weight: 800; }
.hero-stat h3 span { color: var(--secondary); }
.hero-stat p { font-size: 13px; color: var(--text-muted); }
.hero-visual {
    display: flex; align-items: center; justify-content: center; position: relative;
}
.hero-mockup {
    width: 100%; max-width: 500px; border-radius: var(--radius-xl);
    background: var(--dark-card); border: 1px solid var(--dark-border);
    padding: 24px; position: relative; animation: fadeInUp 0.8s ease;
}
.hero-mockup-header { display:flex; gap:6px; margin-bottom:20px; }
.hero-mockup-header span { width:12px; height:12px; border-radius:50%; }
.hero-mockup-header span:nth-child(1) { background:#EF4444; }
.hero-mockup-header span:nth-child(2) { background:#F59E0B; }
.hero-mockup-header span:nth-child(3) { background:#10B981; }
.mockup-line { height:12px; border-radius:6px; margin-bottom:10px; animation:fadeIn 0.5s ease forwards; opacity:0; }
.mockup-line:nth-child(2) { width:80%; background:rgba(108,60,225,0.3); animation-delay:0.2s; }
.mockup-line:nth-child(3) { width:100%; background:rgba(108,60,225,0.15); animation-delay:0.4s; }
.mockup-line:nth-child(4) { width:60%; background:rgba(255,107,53,0.2); animation-delay:0.6s; }
.mockup-line:nth-child(5) { width:90%; background:rgba(108,60,225,0.1); animation-delay:0.8s; }
.mockup-line:nth-child(6) { width:70%; background:rgba(6,214,160,0.15); animation-delay:1s; }
.voice-wave {
    display:flex; align-items:center; gap:3px; padding:16px; margin-top:16px;
    background:rgba(108,60,225,0.1); border-radius:var(--radius-md); border:1px solid rgba(108,60,225,0.2);
}
.voice-wave .bar {
    width:4px; border-radius:2px; background:var(--primary);
    animation: pulse 0.5s ease infinite;
}
.voice-wave .bar:nth-child(1) { height:16px; animation-delay:0s; }
.voice-wave .bar:nth-child(2) { height:28px; animation-delay:0.1s; }
.voice-wave .bar:nth-child(3) { height:20px; animation-delay:0.2s; }
.voice-wave .bar:nth-child(4) { height:36px; animation-delay:0.3s; }
.voice-wave .bar:nth-child(5) { height:24px; animation-delay:0.4s; }
.voice-wave .bar:nth-child(6) { height:32px; animation-delay:0.5s; }
.voice-wave .bar:nth-child(7) { height:18px; animation-delay:0.6s; }
.voice-wave .bar:nth-child(8) { height:40px; animation-delay:0.7s; }
.voice-wave .bar:nth-child(9) { height:22px; animation-delay:0.8s; }
.voice-wave .bar:nth-child(10) { height:30px; animation-delay:0.9s; }
.voice-wave-label { margin-left:12px; font-size:13px; color:var(--primary-light); }
.orbit-ring {
    position:absolute; width:240px; height:240px; border-radius:50%;
    border:1px dashed rgba(108,60,225,0.2); top:50%; left:50%;
    transform:translate(-50%,-50%); pointer-events:none;
}
.orbit-item {
    position:absolute; width:40px; height:40px; border-radius:50%;
    background:var(--dark-card); border:1px solid var(--dark-border);
    display:flex; align-items:center; justify-content:center; font-size:18px;
    animation: orbit 15s linear infinite;
}
.orbit-item:nth-child(2) { animation-delay: -5s; }
.orbit-item:nth-child(3) { animation-delay: -10s; }

/* === SECTIONS === */
.section {
    padding: 100px 24px; max-width: 1280px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: var(--radius-full);
    background: rgba(108,60,225,0.1); font-size: 13px;
    color: var(--primary-light); margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.section-header p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* === FEATURE CARDS === */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg); padding: 32px; transition: var(--transition);
    position: relative; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.feature-card::before {
    content:''; position:absolute; top:0; left:0; right:0; height:3px;
    background:var(--gradient-primary); opacity:0; transition: var(--transition);
}
.feature-card:hover { transform:translateY(-4px); border-color:rgba(108,60,225,0.3); }
.feature-card:hover::before { opacity:1; }
.feature-icon {
    width:52px; height:52px; border-radius:var(--radius-md);
    background:rgba(108,60,225,0.15); display:flex; align-items:center; justify-content:center;
    font-size:22px; color:var(--primary-light); margin-bottom:20px;
}
.feature-card h3 { font-size:18px; font-weight:700; margin-bottom:8px; }
.feature-card p { font-size:14px; color:var(--text-secondary); line-height:1.6; }
.feature-tag {
    display:inline-block; padding:3px 10px; border-radius:var(--radius-full);
    font-size:11px; font-weight:600; margin-top:12px;
}
.feature-tag.premium { background:rgba(255,107,53,0.15); color:var(--secondary); }
.feature-tag.free { background:rgba(6,214,160,0.15); color:var(--accent); }

/* === PRICING === */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.pricing-card {
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg); padding: 32px; text-align: center;
    transition: var(--transition); position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pricing-card.popular {
    border-color: var(--primary); transform: scale(1.03);
    box-shadow: var(--shadow-glow);
}
.pricing-card.popular::before {
    content:'POPULER'; position:absolute; top:16px; right:16px;
    padding:4px 12px; border-radius:var(--radius-full);
    background:var(--gradient-primary); font-size:11px; font-weight:700;
}
.pricing-card:hover { transform:translateY(-4px); border-color:rgba(108,60,225,0.4); }
.pricing-card.popular:hover { transform:scale(1.03) translateY(-4px); }
.pricing-name { font-size:18px; font-weight:700; margin-bottom:8px; }
.pricing-price { font-size:36px; font-weight:800; margin:16px 0; }
.pricing-price small { font-size:14px; color:var(--text-muted); font-weight:400; }
.pricing-original { text-decoration:line-through; color:var(--text-muted); font-size:14px; }
.pricing-features { list-style:none; text-align:left; margin:24px 0; }
.pricing-features li { padding:8px 0; font-size:14px; color:var(--text-secondary); display:flex; align-items:center; gap:8px; }
.pricing-features li i { color:var(--accent); font-size:14px; }

/* === LOGIN/REGISTER MODAL === */
.modal-overlay {
    display:none; position:fixed; inset:0; background:rgba(0,0,0,0.7);
    backdrop-filter:blur(8px); z-index:2000; align-items:center; justify-content:center;
    padding:20px;
}
.modal-overlay.active { display:flex; }
.modal-box {
    background:var(--dark-card); border:1px solid var(--dark-border);
    border-radius:var(--radius-xl); padding:40px; width:100%; max-width:440px;
    animation:fadeInUp 0.3s ease; max-height:90vh; overflow-y:auto;
}
.modal-box h2 { font-size:24px; font-weight:800; margin-bottom:8px; }
.modal-box .subtitle { color:var(--text-secondary); font-size:14px; margin-bottom:28px; }
.modal-close { position:absolute; top:16px; right:16px; background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:20px; }

/* === FORMS === */
.form-group { margin-bottom: 20px; }
.form-group label { display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--text-secondary); }
.form-control {
    width:100%; padding:12px 16px; border-radius:var(--radius-md);
    background:var(--dark-surface); border:1px solid var(--dark-border);
    color:var(--text-primary); font-size:14px; font-family:inherit;
    transition:var(--transition);
}
.form-control:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(108,60,225,0.2); }
.form-control::placeholder { color:var(--text-muted); }
textarea.form-control { resize:vertical; min-height:100px; }
select.form-control { cursor:pointer; }
.form-hint { font-size:12px; color:var(--text-muted); margin-top:4px; }

/* === DASHBOARD LAYOUT === */
.dash-layout { display:flex; min-height:100vh; }
.sidebar {
    width:260px; background:var(--dark-card); border-right:1px solid var(--dark-border);
    position:fixed; top:0; left:0; bottom:0; z-index:100; overflow-y:auto;
    transition:var(--transition);
}
.sidebar-header {
    padding:20px; display:flex; align-items:center; gap:12px;
    border-bottom:1px solid var(--dark-border);
}
.sidebar-header .logo-mini {
    width:36px; height:36px; border-radius:var(--radius-sm);
    background:var(--gradient-primary); display:flex; align-items:center; justify-content:center;
    font-size:16px; font-weight:800;
}
.sidebar-header h3 { font-size:16px; font-weight:700; }
.sidebar-nav { padding:12px; }
.sidebar-label { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; padding:12px; letter-spacing:1px; }
.sidebar-item {
    display:flex; align-items:center; gap:12px; padding:11px 14px;
    border-radius:var(--radius-md); color:var(--text-secondary); font-size:14px;
    text-decoration:none; transition:var(--transition); cursor:pointer;
    border:none; background:none; width:100%; text-align:left; font-family:inherit;
}
.sidebar-item:hover { background:rgba(108,60,225,0.1); color:var(--text-primary); }
.sidebar-item.active { background:rgba(108,60,225,0.15); color:var(--primary-light); font-weight:600; }
.sidebar-item i { width:20px; text-align:center; font-size:15px; }
.sidebar-item .badge-count {
    margin-left:auto; background:var(--primary); color:#fff;
    font-size:11px; padding:2px 8px; border-radius:var(--radius-full); font-weight:600;
}
.sidebar-footer { padding:16px; border-top:1px solid var(--dark-border); }
.sidebar-user { display:flex; align-items:center; gap:10px; }
.sidebar-user img { width:36px; height:36px; border-radius:50%; object-fit:cover; border:2px solid var(--dark-border); }
.sidebar-user .user-info h4 { font-size:13px; font-weight:600; }
.sidebar-user .user-info p { font-size:11px; color:var(--text-muted); }

.main-content { flex:1; margin-left:260px; min-height:100vh; }
.content-header {
    padding:20px 30px; background:var(--dark-card);
    border-bottom:1px solid var(--dark-border);
    display:flex; align-items:center; justify-content:space-between;
}
.content-header h1 { font-size:22px; font-weight:700; }
.content-body { padding:30px; }

/* === STAT CARDS === */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:20px; margin-bottom:30px; }
.stat-card {
    background:var(--dark-card); border:1px solid var(--dark-border);
    border-radius:var(--radius-lg); padding:24px; transition:var(--transition);
}
.stat-card:hover { transform:translateY(-2px); border-color:rgba(108,60,225,0.3); }
.stat-card .stat-icon {
    width:44px; height:44px; border-radius:var(--radius-md);
    display:flex; align-items:center; justify-content:center; font-size:18px; margin-bottom:14px;
}
.stat-card .stat-icon.purple { background:rgba(108,60,225,0.15); color:var(--primary-light); }
.stat-card .stat-icon.orange { background:rgba(255,107,53,0.15); color:var(--secondary); }
.stat-card .stat-icon.green { background:rgba(6,214,160,0.15); color:var(--accent); }
.stat-card .stat-icon.blue { background:rgba(59,130,246,0.15); color:var(--info); }
.stat-card h3 { font-size:28px; font-weight:800; margin-bottom:4px; }
.stat-card p { font-size:13px; color:var(--text-muted); }

/* === DATA TABLE === */
.data-card {
    background:var(--dark-card); border:1px solid var(--dark-border);
    border-radius:var(--radius-lg); overflow:hidden; margin-bottom:24px;
}
.data-card-header {
    padding:20px 24px; display:flex; align-items:center; justify-content:space-between;
    border-bottom:1px solid var(--dark-border);
}
.data-card-header h3 { font-size:16px; font-weight:700; }
.data-table { width:100%; border-collapse:collapse; }
.data-table th, .data-table td { padding:14px 24px; text-align:left; font-size:14px; }
.data-table th { background:var(--dark-surface); color:var(--text-muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:0.5px; }
.data-table td { border-bottom:1px solid var(--dark-border); }
.data-table tr:last-child td { border-bottom:none; }
.data-table tr:hover td { background:rgba(108,60,225,0.03); }

/* === STATUS BADGES === */
.status { display:inline-flex; align-items:center; gap:6px; padding:4px 12px; border-radius:var(--radius-full); font-size:12px; font-weight:600; }
.status.active { background:rgba(16,185,129,0.15); color:var(--success); }
.status.pending { background:rgba(245,158,11,0.15); color:var(--warning); }
.status.expired { background:rgba(239,68,68,0.15); color:var(--danger); }
.status.suspended { background:rgba(107,97,144,0.15); color:var(--text-muted); }
.status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }

/* === TABS === */
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--dark-border); margin-bottom:24px; overflow-x:auto; }
.tab-btn {
    padding:12px 20px; background:none; border:none; color:var(--text-muted);
    font-size:14px; font-weight:500; cursor:pointer; font-family:inherit;
    border-bottom:2px solid transparent; transition:var(--transition); white-space:nowrap;
}
.tab-btn.active { color:var(--primary-light); border-bottom-color:var(--primary); }
.tab-btn:hover { color:var(--text-primary); }
.tab-content { display:none; }
.tab-content.active { display:block; animation:fadeIn 0.3s ease; }

/* === VOICE RECORDER (Mobile-like) === */
.voice-recorder {
    background:var(--dark-card); border:1px solid var(--dark-border);
    border-radius:var(--radius-xl); padding:40px; text-align:center;
}
.mic-btn {
    width:100px; height:100px; border-radius:50%; border:none;
    background:var(--gradient-primary); color:#fff; font-size:36px;
    cursor:pointer; transition:var(--transition); margin:20px auto;
    display:flex; align-items:center; justify-content:center;
}
.mic-btn:hover { transform:scale(1.1); box-shadow:var(--shadow-glow); }
.mic-btn.recording { animation:glow 1.5s infinite; background:var(--danger); }

/* === WRITER EDITOR === */
.editor-container { display:grid; grid-template-columns:250px 1fr 300px; gap:0; min-height:calc(100vh - 60px); }
.editor-sidebar {
    background:var(--dark-card); border-right:1px solid var(--dark-border);
    padding:20px; overflow-y:auto;
}
.editor-main { background:var(--dark-surface); padding:40px; overflow-y:auto; }
.editor-panel {
    background:var(--dark-card); border-left:1px solid var(--dark-border);
    padding:20px; overflow-y:auto;
}
.editor-area {
    background:var(--dark); border:1px solid var(--dark-border);
    border-radius:var(--radius-md); padding:32px; min-height:500px;
    font-size:16px; line-height:1.8; color:var(--text-primary);
    font-family:'Plus Jakarta Sans',sans-serif;
}
.editor-area:focus { outline:none; border-color:var(--primary); }

/* === COMMUNITY === */
.post-card {
    background:var(--dark-card); border:1px solid var(--dark-border);
    border-radius:var(--radius-lg); padding:24px; margin-bottom:16px;
}
.post-header { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.post-avatar { width:40px; height:40px; border-radius:50%; object-fit:cover; }
.post-author h4 { font-size:14px; font-weight:600; }
.post-author p { font-size:12px; color:var(--text-muted); }
.post-content { font-size:15px; line-height:1.7; margin-bottom:16px; }
.post-actions { display:flex; gap:20px; }
.post-action { background:none; border:none; color:var(--text-muted); font-size:13px; cursor:pointer; display:flex; align-items:center; gap:6px; font-family:inherit; transition:var(--transition); }
.post-action:hover { color:var(--primary-light); }

/* === TOAST === */
.toast-container { position:fixed; top:20px; right:20px; z-index:9999; display:flex; flex-direction:column; gap:10px; }
.toast {
    padding:14px 20px; border-radius:var(--radius-md); font-size:14px;
    animation:slideInRight 0.3s ease; display:flex; align-items:center; gap:10px;
    min-width:300px; box-shadow:var(--shadow-lg);
}
.toast.success { background:var(--success); color:#fff; }
.toast.error { background:var(--danger); color:#fff; }
.toast.warning { background:var(--warning); color:#000; }
.toast.info { background:var(--info); color:#fff; }

/* === COIN DISPLAY === */
.coin-badge {
    display:inline-flex; align-items:center; gap:6px; padding:6px 14px;
    background:rgba(255,107,53,0.15); border-radius:var(--radius-full);
    font-weight:700; font-size:14px; color:var(--secondary);
}
.coin-badge i { color:var(--warning); }

/* === LEADERBOARD === */
.leaderboard-item {
    display:flex; align-items:center; gap:16px; padding:16px 20px;
    border-bottom:1px solid var(--dark-border); transition:var(--transition);
}
.leaderboard-item:hover { background:rgba(108,60,225,0.05); }
.rank-num { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; }
.rank-1 { background:linear-gradient(135deg,#FFD700,#FFA500); color:#000; }
.rank-2 { background:linear-gradient(135deg,#C0C0C0,#A0A0A0); color:#000; }
.rank-3 { background:linear-gradient(135deg,#CD7F32,#B87333); color:#fff; }
.rank-default { background:var(--dark-surface); color:var(--text-muted); }

/* === FOOTER === */
.footer { background:var(--dark-card); border-top:1px solid var(--dark-border); padding:60px 24px 30px; }
.footer-grid { max-width:1280px; margin:0 auto; display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; margin-bottom:40px; }
.footer-brand p { color:var(--text-secondary); font-size:14px; margin-top:12px; }
.footer-col h4 { font-size:14px; font-weight:700; margin-bottom:16px; }
.footer-col a { display:block; color:var(--text-secondary); font-size:14px; text-decoration:none; padding:4px 0; transition:var(--transition); }
.footer-col a:hover { color:var(--primary-light); }
.footer-bottom { border-top:1px solid var(--dark-border); padding-top:24px; text-align:center; font-size:13px; color:var(--text-muted); max-width:1280px; margin:0 auto; }

/* === MOBILE RESPONSIVE === */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns:1fr; text-align:center; }
    .hero p { margin:0 auto 32px; }
    .hero-actions { justify-content:center; }
    .hero-stats { justify-content:center; }
    .hero-visual { display:none; }
    .editor-container { grid-template-columns:1fr; }
    .editor-sidebar, .editor-panel { display:none; }
    .footer-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display:none; }
    .nav-burger { display:block; }
    .sidebar { transform:translateX(-100%); width:280px; position:fixed; z-index:150; }
    .sidebar.open { transform:translateX(0); box-shadow:4px 0 24px rgba(0,0,0,0.15); }
    .main-content { margin-left:0 !important; }
    .content-header { padding:16px 20px; }
    .content-body { padding:16px; }
    .stat-grid { grid-template-columns:1fr 1fr; gap:12px; }
    .stat-card { padding:16px; }
    .stat-card h3 { font-size:22px; }
    .hero { padding:100px 16px 60px; }
    .hero h1 { font-size:32px; }
    .features-grid { grid-template-columns:1fr; }
    .pricing-grid { grid-template-columns:1fr; }
    .pricing-card.popular { transform:none; }
    .footer-grid { grid-template-columns:1fr; }
    .data-table th, .data-table td { padding:10px 14px; }
    .section { padding:60px 16px; }
    .modal-box { padding:24px; max-width:100% !important; margin:8px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns:1fr; }
    .hero-stats { flex-direction:column; gap:16px; }
    .data-table th, .data-table td { padding:8px 10px; font-size:12px; }
}

/* === UTILITY === */
.text-center { text-align:center; }
.text-right { text-align:right; }
.flex { display:flex; }
.flex-between { display:flex; justify-content:space-between; align-items:center; }
.flex-center { display:flex; align-items:center; justify-content:center; }
.gap-8 { gap:8px; }
.gap-12 { gap:12px; }
.gap-16 { gap:16px; }
.gap-20 { gap:20px; }
.mt-8 { margin-top:8px; }
.mt-16 { margin-top:16px; }
.mt-24 { margin-top:24px; }
.mb-8 { margin-bottom:8px; }
.mb-16 { margin-bottom:16px; }
.mb-24 { margin-bottom:24px; }
.hidden { display:none !important; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* ============================================================
   LIGHT DASHBOARD THEME
   Applied to .dash-layout to make admin & writer dashboards bright
   ============================================================ */
.dash-layout {
    --dark: #F5F7FA;
    --dark-card: #FFFFFF;
    --dark-surface: #F0F4F8;
    --dark-border: #E2E8F0;
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --gradient-hero: linear-gradient(135deg, #F5F7FA 0%, #EEF2FF 50%, #E0E7FF 100%);
    --gradient-card: linear-gradient(145deg, rgba(108,60,225,0.04), rgba(255,107,53,0.02));
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(108,60,225,0.15);
}
.dash-layout body, .dash-layout { background: var(--dark); color: var(--text-primary); }

/* Sidebar Light */
.dash-layout .sidebar {
    background: #FFFFFF;
    border-right: 1px solid #E2E8F0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}
.dash-layout .sidebar-header {
    border-bottom: 1px solid #E2E8F0;
    background: linear-gradient(135deg, #6C3CE1 0%, #8B5CF6 100%);
    padding: 18px 20px;
}
.dash-layout .sidebar-header h3 { color: #fff; }
.dash-layout .sidebar-header p { color: rgba(255,255,255,0.7) !important; }
.dash-layout .sidebar-header .logo-mini { background: rgba(255,255,255,0.2) !important; }
.dash-layout .sidebar-item { color: #475569; }
.dash-layout .sidebar-item:hover { background: #F0F4FF; color: #6C3CE1; }
.dash-layout .sidebar-item.active { background: #EDE9FE; color: #6C3CE1; font-weight: 700; }
.dash-layout .sidebar-item i { color: inherit; }
.dash-layout .sidebar-footer { border-top: 1px solid #E2E8F0; background: #FAFBFC; }
.dash-layout .sidebar-user .user-info h4 { color: #1E293B; }
.dash-layout .sidebar-user .user-info p { color: #94A3B8; }
.dash-layout .sidebar-label { color: #94A3B8; }

/* Content Header Light */
.dash-layout .content-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.dash-layout .content-header h1 { color: #1E293B; }

/* Stat Cards Light */
.dash-layout .stat-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.dash-layout .stat-card:hover { border-color: #C7D2FE; box-shadow: 0 4px 12px rgba(108,60,225,0.08); }
.dash-layout .stat-card h3 { color: #1E293B; }
.dash-layout .stat-card p { color: #94A3B8; }

/* Data Card Light */
.dash-layout .data-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.dash-layout .data-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.dash-layout .data-card-header { border-bottom: 1px solid #E2E8F0; }
.dash-layout .data-card-header h3 { color: #1E293B; }

/* Table Light */
.dash-layout .data-table th { background: #F8FAFC; color: #64748B; border-bottom: 1px solid #E2E8F0; }
.dash-layout .data-table td { border-bottom: 1px solid #F1F5F9; color: #334155; }
.dash-layout .data-table tr:hover td { background: #F8FAFC; }

/* Forms Light */
.dash-layout .form-control {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    color: #1E293B;
}
.dash-layout .form-control:focus { border-color: #6C3CE1; box-shadow: 0 0 0 3px rgba(108,60,225,0.1); }
.dash-layout .form-control::placeholder { color: #9CA3AF; }
.dash-layout .form-group label { color: #374151; }

/* Tabs Light */
.dash-layout .tabs { border-bottom: 1px solid #E2E8F0; }
.dash-layout .tab-btn { color: #64748B; }
.dash-layout .tab-btn.active { color: #6C3CE1; border-bottom-color: #6C3CE1; }
.dash-layout .tab-btn:hover { color: #1E293B; }

/* Status Badges Light */
.dash-layout .status.active { background: #ECFDF5; color: #059669; }
.dash-layout .status.pending { background: #FFFBEB; color: #D97706; }
.dash-layout .status.expired { background: #FEF2F2; color: #DC2626; }
.dash-layout .status.suspended { background: #F3F4F6; color: #6B7280; }
.dash-layout .status.writing { background: #EEF2FF; color: #4F46E5; }
.dash-layout .status.draft { background: #F3F4F6; color: #6B7280; }
.dash-layout .status.completed { background: #ECFDF5; color: #059669; }

/* Buttons in Light Dashboard */
.dash-layout .btn-outline { color: #374151; border-color: #D1D5DB; }
.dash-layout .btn-outline:hover { border-color: #6C3CE1; color: #6C3CE1; background: rgba(108,60,225,0.05); }
.dash-layout .btn-ghost { color: #6C3CE1; }
.dash-layout .btn-ghost:hover { background: rgba(108,60,225,0.05); }

/* Action buttons */
.dash-layout .action-btn { border-color: #D1D5DB; color: #64748B; background: #fff; }
.dash-layout .action-btn:hover { border-color: #6C3CE1; color: #6C3CE1; background: #F5F3FF; }
.dash-layout .action-btn.danger:hover { border-color: #EF4444; color: #EF4444; background: #FEF2F2; }
.dash-layout .action-btn.success { border-color: #10B981; color: #10B981; }
.dash-layout .action-btn.success:hover { background: #ECFDF5; }

/* Modal in light theme */
.dash-layout .modal-overlay { background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
.dash-layout .modal-box { background: #FFFFFF; border: 1px solid #E2E8F0; }
.dash-layout .modal-box h2 { color: #1E293B; }
.dash-layout .modal-box .subtitle { color: #64748B; }

/* Feature cards in light */
.dash-layout .feature-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.dash-layout .feature-item:hover {
    transform: translateY(-3px);
    border-color: #C7D2FE;
    box-shadow: 0 4px 12px rgba(108,60,225,0.1);
}
.dash-layout .feature-item i { color: #6C3CE1; }
.dash-layout .feature-item h4 { color: #1E293B; }
.dash-layout .feature-item p { color: #94A3B8; }

/* Book Card Light */
.dash-layout .book-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.dash-layout .book-card:hover { border-color: #C7D2FE; box-shadow: 0 4px 12px rgba(108,60,225,0.08); }
.dash-layout .book-card h4 { color: #1E293B; }
.dash-layout .book-meta { color: #94A3B8; }

/* Post Card Light */
.dash-layout .post-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 12px;
}
.dash-layout .post-author h4 { color: #1E293B; }
.dash-layout .post-author p { color: #94A3B8; }
.dash-layout .post-content { color: #334155; }
.dash-layout .post-action { color: #94A3B8; }
.dash-layout .post-action:hover { color: #6C3CE1; }

/* Community Sidebar */
.community-sidebar .data-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 12px;
    overflow: hidden;
}

/* Community Action Buttons */
.community-action-btn:hover { background: #F0F2F5 !important; }
.community-action-btn:active { transform: scale(0.98); }

/* AI Result Markdown Styles */
.dash-layout #featureResult strong { font-weight: 700; color: #1E293B; }
.dash-layout #featureResult em { font-style: italic; }
.dash-layout #featureResult h2, .dash-layout #featureResult h3, .dash-layout #featureResult h4 { margin-top: 16px; margin-bottom: 8px; }

/* Community Grid Mobile */
@media (max-width: 900px) {
    .content-body > div[style*="grid-template-columns: 1fr 300px"],
    .content-body > div[style*="grid-template-columns:1fr 300px"] {
        display: block !important;
    }
    .community-sidebar {
        position: relative !important;
        margin-top: 24px;
    }
}

/* Voice Panel Light */
.dash-layout .voice-panel {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dash-layout .voice-timer { color: #6C3CE1; }
.dash-layout .voice-transcript { background: #F8FAFC; border: 1px solid #E2E8F0; color: #1E293B; }

/* AI Chips Light */
.dash-layout .ai-chip { border-color: #D1D5DB; color: #64748B; background: #fff; }
.dash-layout .ai-chip.active, .dash-layout .ai-chip:hover { border-color: #6C3CE1; background: #EDE9FE; color: #6C3CE1; }

/* Leaderboard Light */
.dash-layout .leaderboard-item { border-bottom: 1px solid #F1F5F9; }
.dash-layout .leaderboard-item:hover { background: #F8FAFC; }

/* Chat Light */
.dash-layout .chat-item { border-bottom: 1px solid #F1F5F9; }
.dash-layout .chat-item:hover { background: #F8FAFC; }
.dash-layout .chat-avatar { background: #F0F4F8; }

/* Coin Badge Light */
.dash-layout .coin-badge { background: #FFF7ED; color: #EA580C; }

/* Pricing in dashboard */
.dash-layout .pricing-card { background: #FFFFFF; border: 1px solid #E2E8F0; }
.dash-layout .pricing-card.popular { border-color: #6C3CE1; box-shadow: 0 4px 16px rgba(108,60,225,0.12); }
.dash-layout .pricing-card:hover { border-color: #C7D2FE; }
.dash-layout .pricing-name { color: #1E293B; }
.dash-layout .pricing-price { color: #1E293B; }

/* Mobile Header Light */
.dash-layout .mobile-header { background: #FFFFFF; border-bottom: 1px solid #E2E8F0; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.dash-layout .burger-btn { color: #374151; }

/* Code/Voucher tags */
.dash-layout code { background: #F1F5F9; color: #6C3CE1; }

/* Scrollbar Light */
.dash-layout ::-webkit-scrollbar-track { background: #F5F7FA; }
.dash-layout ::-webkit-scrollbar-thumb { background: #C7D2FE; }

/* HTML Editor Light */
.dash-layout .html-editor { background: #F8FAFC; border: 1px solid #E2E8F0; color: #1E293B; }

/* Feature tags */
.dash-layout .feature-tag.premium { background: #FFF7ED; color: #EA580C; }
.dash-layout .feature-tag.free { background: #ECFDF5; color: #059669; }

/* Toast in Light */
.dash-layout .toast { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

/* Voucher box */
.dash-layout .voucher-box { background: #FFF7ED; border: 1px dashed #FDBA74; }

/* Error/Success messages */
.dash-layout .error-msg { background: #FEF2F2; border: 1px solid #FECACA; color: #DC2626; }
.dash-layout .success-msg { background: #ECFDF5; border: 1px solid #A7F3D0; color: #059669; }

/* Demo box */
.dash-layout .demo-box { background: #F5F3FF; border: 1px solid #DDD6FE; }

/* Editor container for book editor */
.dash-layout .editor-area {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #1E293B;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.dash-layout .editor-area:focus { border-color: #6C3CE1; box-shadow: 0 0 0 3px rgba(108,60,225,0.1); }
.dash-layout .editor-sidebar { background: #FFFFFF; border-right: 1px solid #E2E8F0; }
.dash-layout .editor-main { background: #F5F7FA; }
.dash-layout .editor-panel { background: #FFFFFF; border-left: 1px solid #E2E8F0; }

/* Alert/info boxes in dashboard */
.dash-layout .alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.dash-layout .alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #B45309; padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.dash-layout .alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.dash-layout .alert-danger { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

/* Chapter list in editor */
.dash-layout .chapter-item { padding: 10px 14px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; font-size: 14px; color: #475569; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.dash-layout .chapter-item:hover { background: #F0F4FF; }
.dash-layout .chapter-item.active { background: #EDE9FE; color: #6C3CE1; font-weight: 600; }
.dash-layout .chapter-item .ch-num { width: 24px; height: 24px; border-radius: 50%; background: #F1F5F9; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.dash-layout .chapter-item.active .ch-num { background: #6C3CE1; color: #fff; }

/* Toolbar for editor */
.dash-layout .editor-toolbar { display: flex; gap: 4px; padding: 10px 16px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px 8px 0 0; flex-wrap: wrap; }
.dash-layout .toolbar-btn { width: 34px; height: 34px; border: none; background: none; border-radius: 6px; cursor: pointer; font-size: 14px; color: #475569; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.dash-layout .toolbar-btn:hover { background: #F0F4FF; color: #6C3CE1; }
.dash-layout .toolbar-btn.active { background: #EDE9FE; color: #6C3CE1; }
.dash-layout .toolbar-divider { width: 1px; background: #E2E8F0; margin: 0 4px; }

/* ═══ Custom Feature Panel Utilities ═══ */
.cpanel-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cpanel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cpanel-result { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; min-height: 100px; max-height: 500px; overflow-y: auto; font-size: 15px; line-height: 1.8; color: #1E293B; white-space: pre-wrap; }
.dash-layout .cpanel-result { background: #FFFFFF; border-color: #E2E8F0; color: #1E293B; }

/* ═══ Responsive: Feature Panels ═══ */
@media (max-width: 768px) {
    .cpanel-grid-2 { grid-template-columns: 1fr; }
    .cpanel-actions { gap: 8px; }
    .cpanel-actions .btn { font-size: 12px; padding: 8px 12px; flex: 1 1 auto; min-width: 120px; justify-content: center; }
    .custom-feature-panel .data-card-header { flex-wrap: wrap; gap: 8px; padding: 16px; }
    .custom-feature-panel .data-card-header h3 { font-size: 16px; }
    .custom-feature-panel div[style*="padding:24px"] { padding: 16px !important; }
    .cpanel-result { max-height: 350px; font-size: 14px; padding: 14px; }
}
@media (max-width: 480px) {
    .cpanel-actions .btn { min-width: 100px; font-size: 11px; padding: 7px 10px; }
    .custom-feature-panel .data-card-header h3 { font-size: 14px; }
    .custom-feature-panel div[style*="padding:24px"] { padding: 12px !important; }
}