/* VoiceForge TTS - Main Stylesheet */
:root {
  --primary:#6366f1; --primary-dark:#4f46e5; --primary-light:#818cf8;
  --secondary:#06b6d4; --accent:#f59e0b;
  --dark:#0f172a; --dark-card:#1e293b; --dark-card2:#162032;
  --text:#e2e8f0; --text-muted:#94a3b8; --border:#334155;
  --success:#10b981; --error:#ef4444; --warning:#f59e0b;
  --gradient:linear-gradient(135deg,#6366f1 0%,#8b5cf6 50%,#06b6d4 100%);
  --shadow:0 4px 6px -1px rgba(0,0,0,.3),0 2px 4px -2px rgba(0,0,0,.2);
  --shadow-lg:0 20px 25px -5px rgba(0,0,0,.4),0 8px 10px -6px rgba(0,0,0,.3);
  --radius:12px; --radius-lg:20px;
  --font-display:'Sora',sans-serif; --font-body:'DM Sans',sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font-body);background:var(--dark);color:var(--text);line-height:1.6;font-size:16px;overflow-x:hidden}
h1,h2,h3,h4,h5,h6{font-family:var(--font-display);font-weight:700;line-height:1.2}
a{color:var(--primary-light);text-decoration:none}
a:hover{color:var(--primary)}
img{max-width:100%;height:auto}

/* Layout */
.container{max-width:1200px;margin:0 auto;padding:0 24px}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 24px;border-radius:var(--radius);font-family:var(--font-display);font-weight:600;font-size:15px;cursor:pointer;transition:all .2s;border:none;outline:none;text-decoration:none}
.btn-primary{background:var(--gradient);color:white;box-shadow:0 0 20px rgba(99,102,241,.4)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 0 30px rgba(99,102,241,.6);color:white}
.btn-secondary{background:rgba(99,102,241,.15);color:var(--primary-light);border:1px solid rgba(99,102,241,.3)}
.btn-secondary:hover{background:rgba(99,102,241,.25);color:var(--primary-light)}
.btn-ghost{background:transparent;color:var(--text-muted)}
.btn-ghost:hover{color:var(--text);background:rgba(255,255,255,.05)}
.btn-danger{background:var(--error);color:white}
.btn-sm{padding:8px 16px;font-size:13px}
.btn-lg{padding:16px 32px;font-size:17px}
.btn:disabled{opacity:.6;cursor:not-allowed;transform:none!important}

/* Cards */
.card{background:var(--dark-card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px}

/* Forms */
input,textarea,select{width:100%;background:rgba(255,255,255,.05);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);padding:12px 16px;font-family:var(--font-body);font-size:15px;transition:border-color .2s;outline:none}
input:focus,textarea:focus,select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(99,102,241,.15)}
input::placeholder,textarea::placeholder{color:var(--text-muted)}
select option{background:var(--dark-card);color:var(--text)}
label{display:block;margin-bottom:6px;font-weight:500;font-size:14px;color:var(--text-muted)}
.form-group{margin-bottom:20px}

/* Badges */
.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:100px;font-size:12px;font-weight:600}
.badge-primary{background:rgba(99,102,241,.2);color:var(--primary-light)}
.badge-success{background:rgba(16,185,129,.2);color:var(--success)}
.badge-warning{background:rgba(245,158,11,.2);color:var(--warning)}

/* Sections */
.section{padding:80px 0}
.section-sm{padding:40px 0}
.section-dark{background:rgba(0,0,0,.2)}
.section-title{font-size:clamp(28px,4vw,42px);margin-bottom:16px}
.section-subtitle{color:var(--text-muted);font-size:clamp(16px,2vw,18px);max-width:600px}
.section-header{text-align:center;margin-bottom:56px}

/* Gradient text */
.gradient-text{background:var(--gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}

/* Spinner */
.spinner{width:24px;height:24px;border:3px solid rgba(99,102,241,.2);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── HEADER ── */
.site-header{position:fixed;top:0;left:0;right:0;z-index:1000;padding:16px 0;transition:all .3s}
.site-header.scrolled{background:rgba(15,23,42,.95);backdrop-filter:blur(20px);border-bottom:1px solid rgba(51,65,85,.5);padding:10px 0;box-shadow:0 4px 20px rgba(0,0,0,.3)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:32px}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:white;flex-shrink:0}
.logo-icon{width:38px;height:38px;background:var(--gradient);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px}
.logo-text{font-family:var(--font-display);font-weight:800;font-size:20px;background:var(--gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.main-nav{display:flex;align-items:center;gap:4px;flex:1}
.nav-link{padding:8px 14px;border-radius:8px;color:var(--text-muted);font-weight:500;font-size:14px;transition:all .2s;text-decoration:none}
.nav-link:hover,.nav-link.active{color:var(--primary-light);background:rgba(255,255,255,.07)}
.header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.hamburger{display:none;background:none;border:none;color:white;cursor:pointer;padding:8px;border-radius:8px;flex-direction:column;gap:5px}
.hamburger span{display:block;width:22px;height:2px;background:white;border-radius:2px;transition:all .3s}
.mobile-menu{display:none;flex-direction:column;gap:4px;position:fixed;top:60px;left:0;right:0;background:rgba(15,23,42,.98);backdrop-filter:blur(20px);border-bottom:1px solid var(--border);padding:16px;z-index:999}
.mobile-menu.open{display:flex}
.mobile-menu a{padding:12px 16px;border-radius:10px;color:var(--text-muted);font-weight:500;text-decoration:none;transition:all .2s}
.mobile-menu a:hover{background:rgba(255,255,255,.07);color:white}

/* ── HERO ── */
.hero{padding:140px 0 80px;position:relative;overflow:hidden}
.hero-bg{position:absolute;inset:0;background:radial-gradient(ellipse 80% 60% at 50% -10%,rgba(99,102,241,.2) 0%,transparent 70%);pointer-events:none}
.hero-text{text-align:center;margin-bottom:48px}
.hero-badge{display:inline-flex;align-items:center;gap:8px;padding:6px 16px;border-radius:100px;background:rgba(99,102,241,.15);border:1px solid rgba(99,102,241,.3);margin-bottom:24px;font-size:13px;font-weight:600;color:var(--primary-light)}
.hero-title{font-size:clamp(36px,6vw,72px);font-weight:800;margin-bottom:24px;line-height:1.1}
.hero-subtitle{color:var(--text-muted);font-size:clamp(16px,2vw,20px);max-width:600px;margin:0 auto 40px;line-height:1.7}
.hero-cta{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.hero-trust{display:flex;align-items:center;justify-content:center;gap:24px;color:var(--text-muted);font-size:13px;flex-wrap:wrap}

/* ── TTS FORM ── */
.tts-wrapper{background:var(--dark-card);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-lg)}
.tts-grid{display:grid;grid-template-columns:1fr 420px;min-height:540px}
.tts-main{padding:28px;border-right:1px solid var(--border);display:flex;flex-direction:column;gap:16px}
.tts-sidebar{background:rgba(0,0,0,.2);padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:600px}
.tts-toolbar{display:flex;gap:12px;flex-wrap:wrap}
.tts-toolbar select{flex:1;min-width:160px}
.tts-textarea{min-height:200px;resize:vertical;font-size:15px;line-height:1.7}
.char-count{font-size:12px;color:var(--text-muted);text-align:right;margin-top:4px}
.char-count.over{color:var(--error)}
.sliders-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:16px;background:rgba(0,0,0,.2);border-radius:var(--radius);border:1px solid var(--border)}
.slider-label{font-size:12px;color:var(--text-muted);margin-bottom:6px;display:flex;justify-content:space-between}
input[type=range]{padding:0;height:6px;border-radius:3px;background:rgba(255,255,255,.1);cursor:pointer;accent-color:var(--primary)}
.tts-action-row{display:flex;gap:12px;flex-wrap:wrap}
.tts-action-row .btn-primary{flex:1;justify-content:center}
.audio-result{background:rgba(99,102,241,.08);border:1px solid rgba(99,102,241,.25);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px}
.audio-result audio{width:100%}
.audio-actions{display:flex;gap:10px;flex-wrap:wrap}
.error-msg{background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:#fca5a5;padding:10px 14px;border-radius:8px;font-size:14px}
.voice-section-label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--text-muted);font-weight:700;margin:10px 0 6px}
.voice-item{padding:10px 12px;border-radius:8px;border:1px solid var(--border);cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:10px;margin-bottom:6px}
.voice-item:hover,.voice-item.selected{border-color:var(--primary);background:rgba(99,102,241,.12)}
.voice-item-info div:first-child{font-weight:600;font-size:13px}
.voice-item-info div:last-child{font-size:11px;color:var(--text-muted)}
.gender-badge{font-size:11px;padding:2px 8px;border-radius:100px;font-weight:600;flex-shrink:0}
.gender-female{background:rgba(236,72,153,.2);color:#f9a8d4}
.gender-male{background:rgba(59,130,246,.2);color:#93c5fd}
.voices-loading{display:flex;justify-content:center;padding:32px}

/* ── FEATURES ── */
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px}
.feature-card{transition:transform .2s,border-color .2s}
.feature-card:hover{transform:translateY(-4px);border-color:rgba(99,102,241,.4)}
.feature-icon{font-size:36px;margin-bottom:16px}
.feature-title{font-size:18px;margin-bottom:8px}
.feature-desc{color:var(--text-muted);font-size:14px;line-height:1.7}

/* ── HOW IT WORKS ── */
.steps-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:32px}
.step-item{text-align:center}
.step-number{width:72px;height:72px;background:var(--gradient);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 20px;font-size:28px;font-weight:800;font-family:var(--font-display);box-shadow:0 0 30px rgba(99,102,241,.4)}
.step-title{font-size:20px;margin-bottom:10px}
.step-desc{color:var(--text-muted);line-height:1.7;font-size:15px}

/* ── USE CASES ── */
.usecase-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
.usecase-card{padding:24px;background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:var(--radius);text-align:center;transition:all .2s}
.usecase-card:hover{background:rgba(99,102,241,.07)}
.usecase-icon{font-size:36px;margin-bottom:12px}
.usecase-title{font-size:16px;margin-bottom:8px}
.usecase-desc{color:var(--text-muted);font-size:13px;line-height:1.6}

/* ── LANGUAGES ── */
.languages-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.lang-card{display:flex;align-items:center;gap:10px;padding:12px 16px;background:rgba(255,255,255,.03);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-size:14px;font-weight:500;transition:all .2s}
.lang-card:hover{border-color:var(--primary);background:rgba(99,102,241,.1);color:white}
.lang-flag{font-size:22px}

/* ── TESTIMONIALS ── */
.testimonials-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}
.testimonial-card{}
.testimonial-stars{color:#f59e0b;font-size:16px;margin-bottom:12px}
.testimonial-text{color:var(--text-muted);margin-bottom:16px;line-height:1.7;font-size:14px}
.testimonial-author{display:flex;align-items:center;gap:12px}
.author-avatar{width:40px;height:40px;border-radius:50%;background:var(--gradient);display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:700;font-size:16px;color:white;flex-shrink:0}
.author-name{font-weight:600;font-size:14px}
.author-role{color:var(--text-muted);font-size:12px}

/* ── FAQ ── */
.faq-list{display:flex;flex-direction:column;gap:8px}
.faq-item{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.faq-question{padding:18px 20px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-weight:600;transition:background .2s;list-style:none}
.faq-question:hover{background:rgba(255,255,255,.03)}
.faq-question::marker,.faq-question::-webkit-details-marker{display:none}
details[open] .faq-question{background:rgba(99,102,241,.05)}
.faq-answer{padding:0 20px 18px;color:var(--text-muted);line-height:1.7}
.faq-icon{font-size:20px;color:var(--primary-light);transition:transform .2s;flex-shrink:0}
details[open] .faq-icon{transform:rotate(45deg)}

/* ── AD BANNERS ── */
.adsense-ad{background:rgba(255,255,255,.03);border:1px dashed rgba(255,255,255,.1);border-radius:var(--radius);display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:12px}
.adsense-728x90{width:100%;max-width:728px;height:90px;margin:0 auto}
.adsense-300x250{width:300px;height:250px}
.adsense-responsive{width:100%;min-height:90px}
.ad-wrap{display:flex;justify-content:center;padding:32px 0}

/* ── BLOG ── */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:24px}
.post-card{overflow:hidden;display:flex;flex-direction:column;padding:0;transition:transform .2s,border-color .2s}
.post-card:hover{transform:translateY(-4px);border-color:rgba(99,102,241,.4)}
.post-thumb{width:100%;height:180px;object-fit:cover}
.post-body{padding:20px;flex:1;display:flex;flex-direction:column}
.post-cat{margin-bottom:12px}
.post-title{font-size:18px;font-weight:700;margin-bottom:10px;line-height:1.3;color:var(--text);text-decoration:none}
.post-title:hover{color:var(--primary-light)}
.post-excerpt{color:var(--text-muted);font-size:14px;line-height:1.6;flex:1}
.post-meta{color:var(--text-muted);font-size:12px;margin-top:12px}
.post-readmore{margin-top:16px;align-self:flex-start}

/* ── SINGLE POST / PAGE ── */
.post-content h1,.post-content h2,.post-content h3{font-family:var(--font-display);margin:32px 0 16px;color:var(--text)}
.post-content p{margin-bottom:20px;color:var(--text-muted);line-height:1.8}
.post-content a{color:var(--primary-light)}
.post-content ul,.post-content ol{margin:16px 0 16px 24px;color:var(--text-muted)}
.post-content li{margin-bottom:8px}
.post-content blockquote{border-left:3px solid var(--primary);padding-left:20px;margin:24px 0;color:var(--text-muted);font-style:italic}
.post-content code{background:rgba(255,255,255,.07);padding:2px 6px;border-radius:4px;font-size:14px}
.post-content pre{background:rgba(0,0,0,.3);padding:20px;border-radius:var(--radius);overflow-x:auto;margin:20px 0}
.post-content strong{color:var(--text)}
.post-content img{border-radius:var(--radius);margin:16px 0}

/* ── BREADCRUMB ── */
.breadcrumb{display:flex;align-items:center;gap:8px;color:var(--text-muted);font-size:14px;margin-bottom:20px}
.breadcrumb a{color:var(--text-muted)}
.breadcrumb a:hover{color:var(--primary-light)}

/* ── PAGE HEADER ── */
.page-header{padding:120px 0 60px}
.page-hero{padding:100px 0 60px}

/* ── FOOTER ── */
.site-footer{background:#080f1e;border-top:1px solid var(--border);padding:60px 0 0;margin-top:80px}
.footer-ad{padding:0 0 32px;display:flex;justify-content:center}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;margin-bottom:48px}
.footer-brand p{color:var(--text-muted);font-size:14px;line-height:1.7;margin-top:16px;max-width:300px}
.footer-social{display:flex;gap:12px;margin-top:20px}
.footer-social a{width:38px;height:38px;border-radius:10px;background:rgba(255,255,255,.05);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s;text-decoration:none}
.footer-social a:hover{background:var(--primary);border-color:var(--primary)}
.footer-col h4{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--text-muted);margin-bottom:16px}
.footer-col ul{list-style:none}
.footer-col ul li{margin-bottom:10px}
.footer-col ul li a{color:rgba(226,232,240,.7);font-size:14px;text-decoration:none;transition:color .2s}
.footer-col ul li a:hover{color:var(--primary-light)}
.footer-bottom{border-top:1px solid var(--border);padding:20px 0;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.footer-bottom p{color:var(--text-muted);font-size:13px}
.footer-bottom a{color:var(--text-muted);font-size:13px}
.footer-bottom a:hover{color:var(--primary-light)}

/* ── ADMIN ── */
.admin-body{background:#0a1120;min-height:100vh;display:flex}
.admin-sidebar{width:250px;background:#111827;border-right:1px solid var(--border);display:flex;flex-direction:column;position:fixed;top:0;left:0;height:100vh;z-index:100;transition:transform .3s}
.admin-content{margin-left:250px;flex:1;min-height:100vh;display:flex;flex-direction:column}
.admin-topbar{background:#111827;border-bottom:1px solid var(--border);padding:14px 24px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50}
.admin-main{padding:32px;flex:1}
.sidebar-logo{padding:20px 20px 12px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px}
.sidebar-logo-name{font-family:var(--font-display);font-weight:800;font-size:15px}
.sidebar-logo-sub{font-size:11px;color:var(--text-muted)}
.admin-nav{flex:1;padding-top:12px;overflow-y:auto}
.admin-nav a{display:flex;align-items:center;gap:12px;padding:11px 20px;border-radius:10px;margin:2px 12px;color:var(--text-muted);font-size:14px;font-weight:500;text-decoration:none;transition:all .15s}
.admin-nav a:hover{background:rgba(255,255,255,.05);color:var(--text)}
.admin-nav a.active{background:rgba(99,102,241,.15);color:var(--primary-light)}
.admin-nav-icon{width:22px;text-align:center;font-size:16px}
.admin-footer{padding:12px 20px;border-top:1px solid var(--border)}
.admin-footer a,.admin-footer-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;color:var(--text-muted);font-size:13px;text-decoration:none;cursor:pointer;transition:all .15s;border:none;background:none;width:100%;font-family:inherit}
.admin-footer a:hover,.admin-footer-item:hover{background:rgba(255,255,255,.05);color:white}
.admin-footer-note{padding:8px 0 0;font-size:12px;color:var(--text-muted);text-align:center}
.admin-user{font-weight:700;color:var(--text)}
.page-heading{margin-bottom:32px}
.page-heading h1{font-size:28px;font-weight:800}
.page-heading p{color:var(--text-muted);margin-top:4px}
.page-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:32px}
.stat-card{text-decoration:none;display:block;transition:transform .2s,border-color .2s}
.stat-card:hover{transform:translateY(-4px)}
.stat-value{font-size:32px;font-weight:800;font-family:var(--font-display)}
.stat-label{color:var(--text-muted);font-size:13px;margin-top:4px}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin-bottom:40px}
.admin-table-wrap{overflow:hidden}
table{width:100%;border-collapse:collapse}
th{text-align:left;padding:12px 16px;font-size:13px;font-weight:600;color:var(--text-muted);border-bottom:1px solid var(--border)}
td{padding:14px 16px;border-bottom:1px solid rgba(51,65,85,.5);font-size:14px;vertical-align:middle}
tr:last-child td{border-bottom:none}
tr:hover td{background:rgba(255,255,255,.02)}
.table-actions{display:flex;gap:8px;flex-wrap:wrap}
.alert{padding:12px 16px;border-radius:var(--radius);font-size:14px;margin-bottom:20px}
.alert-success{background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.3);color:#6ee7b7}
.alert-error{background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:#fca5a5}
.editor-grid{display:grid;grid-template-columns:1fr 300px;gap:24px;align-items:start}
.editor-main{display:flex;flex-direction:column;gap:20px}
.editor-side{display:flex;flex-direction:column;gap:16px}

/* ── PAGINATION ── */
.pagination{display:flex;justify-content:center;gap:8px;margin-top:40px}
.page-btn{padding:8px 16px;border-radius:8px;font-size:14px;font-weight:500;border:1px solid var(--border);background:transparent;color:var(--text-muted);cursor:pointer;transition:all .2s;text-decoration:none}
.page-btn:hover,.page-btn.active{background:var(--primary);border-color:var(--primary);color:white}

/* ── Scrollbar ── */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:var(--dark)}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--primary)}

/* ── RESPONSIVE ── */
@media(max-width:900px){
  .tts-grid{grid-template-columns:1fr}
  .tts-sidebar{max-height:360px;border-right:none;border-top:1px solid var(--border)}
  .sliders-row{grid-template-columns:1fr}
  .admin-sidebar{transform:translateX(-100%)}
  .admin-sidebar.open{transform:translateX(0)}
  .admin-content{margin-left:0}
  .editor-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr;gap:32px}
  .footer-brand{grid-column:1/-1}
}
@media(max-width:768px){
  .section{padding:56px 0}
  .container{padding:0 16px}
  .main-nav,.header-actions .btn:not(.btn-primary){display:none}
  .hamburger{display:flex}
  .hero{padding:100px 0 60px}
  .footer-grid{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column;text-align:center}
  .adsense-300x250{width:100%;height:200px}
}


/* ═══════════════════════════════════════════════════════
   LIGHT MODE THEME
   ═══════════════════════════════════════════════════════ */
[data-theme="light"] {
  --dark:      #f1f5f9;
  --dark-card: #ffffff;
  --dark-card2:#f8fafc;
  --text:      #0f172a;
  --text-muted:#64748b;
  --border:    #cbd5e1;
  --gradient:  linear-gradient(135deg,#6366f1 0%,#8b5cf6 50%,#06b6d4 100%);
  --shadow:    0 4px 6px -1px rgba(0,0,0,.08),0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.12),0 8px 10px -6px rgba(0,0,0,.08);
}

[data-theme="light"] body {
  background: var(--dark);
  color: var(--text);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(241,245,249,.95);
  border-bottom-color: var(--border);
}

[data-theme="light"] .mobile-menu {
  background: rgba(241,245,249,.98);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: #94a3b8; }

[data-theme="light"] select option { background: #fff; color: #0f172a; }

[data-theme="light"] .card {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

[data-theme="light"] .tts-sidebar {
  background: #f8fafc;
}

[data-theme="light"] .voice-item {
  border-color: #e2e8f0;
}

[data-theme="light"] .voice-item:hover,
[data-theme="light"] .voice-item.selected {
  background: rgba(99,102,241,.08);
  border-color: var(--primary);
}

[data-theme="light"] .voice-search-input {
  background: #fff;
  border-color: #e2e8f0;
  color: var(--text);
}

[data-theme="light"] .sliders-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .audio-result {
  background: rgba(99,102,241,.06);
  border-color: rgba(99,102,241,.2);
}

[data-theme="light"] .site-footer {
  background: #e2e8f0;
  border-top-color: #cbd5e1;
}

[data-theme="light"] .footer-col ul li a { color: #475569; }
[data-theme="light"] .footer-bottom p    { color: #64748b; }
[data-theme="light"] .footer-bottom a    { color: #64748b; }

[data-theme="light"] .admin-body         { background: #f1f5f9; }
[data-theme="light"] .admin-sidebar,
[data-theme="light"] .admin-topbar       { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .admin-nav a        { color: #64748b; }
[data-theme="light"] .admin-nav a:hover  { background: rgba(99,102,241,.06); color: #0f172a; }
[data-theme="light"] .admin-nav a.active { background: rgba(99,102,241,.12); color: var(--primary); }

[data-theme="light"] .adsense-ad {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.1);
}

[data-theme="light"] table th { color: #64748b; border-bottom-color: #e2e8f0; }
[data-theme="light"] table td { border-bottom-color: #f1f5f9; }
[data-theme="light"] table tr:hover td { background: rgba(99,102,241,.03); }


/* ═══════════════════════════════════════════════════════
   DARK / LIGHT TOGGLE BUTTON
   ═══════════════════════════════════════════════════════ */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all .2s;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: rgba(99,102,241,.15);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* Dark mode → show moon, hide sun */
.theme-toggle .theme-icon-dark  { display: flex; }
.theme-toggle .theme-icon-light { display: none; }

/* Light mode → hide moon, show sun */
.theme-toggle.light-mode .theme-icon-dark  { display: none; }
.theme-toggle.light-mode .theme-icon-light { display: flex; }

[data-theme="light"] .theme-toggle {
  background: rgba(0,0,0,.05);
  border-color: #cbd5e1;
}


/* ═══════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════════════════ */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  transition: all .2s;
  flex-shrink: 0;
  position: relative;
}
.theme-toggle:hover {
  background: rgba(99,102,241,.15);
  border-color: var(--primary);
  transform: scale(1.05);
}
/* Show moon icon in dark mode (default) */
.theme-toggle .icon-moon { display: flex; }
.theme-toggle .icon-sun  { display: none; }
/* Show sun icon in light mode */
.theme-toggle[data-theme-active="light"] .icon-moon { display: none; }
.theme-toggle[data-theme-active="light"] .icon-sun  { display: flex; }

[data-theme="light"] .theme-toggle {
  background: rgba(0,0,0,.04);
  border-color: #cbd5e1;
}


/* ═══════════════════════════════════════════════════════
   WYSIWYG EDITOR
   ═══════════════════════════════════════════════════════ */
.wysiwyg-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.wysiwyg-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(0,0,0,.15);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.wysiwyg-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  font-family: serif;
  width: auto;
  padding: 4px 8px;
  min-width: 28px;
}
.wysiwyg-btn:hover  { background: rgba(255,255,255,.1); color: var(--text); }
.wysiwyg-btn.active { background: rgba(99,102,241,.2);  color: var(--primary-light); }
.wysiwyg-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.wysiwyg-mode-btn {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  width: auto;
  height: auto;
}
.wysiwyg-mode-btn:hover, .wysiwyg-mode-btn.active {
  background: rgba(99,102,241,.15);
  color: var(--primary-light);
  border-color: var(--primary);
}
.wysiwyg-editor {
  min-height: 320px;
  padding: 16px;
  outline: none;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: transparent;
  overflow-y: auto;
}
.wysiwyg-editor h1,.wysiwyg-editor h2,.wysiwyg-editor h3,.wysiwyg-editor h4 {
  font-family: var(--font-display); margin: 16px 0 8px; color: var(--text);
}
.wysiwyg-editor p    { margin-bottom: 12px; }
.wysiwyg-editor ul,
.wysiwyg-editor ol   { margin: 8px 0 8px 24px; }
.wysiwyg-editor a    { color: var(--primary-light); }
.wysiwyg-editor blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-muted);
  font-style: italic;
}
.wysiwyg-editor img  { max-width: 100%; border-radius: 8px; }
.wysiwyg-editor:focus { box-shadow: none; }

/* HTML raw textarea (hidden by default) */
.wysiwyg-raw {
  display: none;
  width: 100%;
  min-height: 320px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  background: rgba(0,0,0,.2);
  color: #a8ff78;
  border: none;
  resize: vertical;
  outline: none;
  border-radius: 0;
}
.wysiwyg-raw:focus { box-shadow: none; }

[data-theme="light"] .wysiwyg-toolbar  { background: #f8fafc; border-bottom-color: #e2e8f0; }
[data-theme="light"] .wysiwyg-editor   { color: #0f172a; }
[data-theme="light"] .wysiwyg-raw      { background: #1e293b; }
[data-theme="light"] .wysiwyg-btn:hover { background: rgba(0,0,0,.06); color: #0f172a; }


/* ═══════════════════════════════════════════════════════
   VOICE SIDEBAR — 2 COLUMN MALE | FEMALE
   ═══════════════════════════════════════════════════════ */

/* Sidebar top area: title + search */
.sidebar-top {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-voices-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Search box */
.voice-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.voice-search-icon {
  position: absolute;
  left: 9px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.6;
}
.voice-search-input {
  width: 100%;
  padding: 8px 28px 8px 28px;
  font-size: 13px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color .2s;
  outline: none;
  height: auto;
}
.voice-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.voice-search-input::placeholder { color: var(--text-muted); font-size: 12px; }
.voice-search-clear {
  position: absolute;
  right: 7px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 3px 5px;
  border-radius: 4px;
  display: none;
  align-items: center;
  width: auto;
  height: auto;
  min-width: unset;
  line-height: 1;
}
.voice-search-clear:hover { color: var(--error); background: rgba(239,68,68,.1); }

/* Column headers row */
.voice-cols-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.vcol-head {
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.male-head {
  background: rgba(59,130,246,.12);
  color: #93c5fd;
  border-right: 1px solid var(--border);
}
.female-head {
  background: rgba(236,72,153,.12);
  color: #f9a8d4;
}

/* 2-col grid container */
.voices-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Each column scrolls independently */
.voice-col {
  overflow-y: auto;
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid rgba(51,65,85,.5);
}
.voice-col:last-child { border-right: none; }

/* Voice item */
.voice-item {
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .12s;
  background: transparent;
  flex-shrink: 0;
}
.voice-item:hover {
  background: rgba(99,102,241,.12);
  border-color: rgba(99,102,241,.3);
}
.voice-item.selected {
  background: rgba(99,102,241,.22);
  border-color: var(--primary);
}
.voice-item-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voice-item-locale {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}
.voice-col-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  padding: 16px 6px;
}

/* Thin scrollbars for columns */
.voice-col::-webkit-scrollbar { width: 3px; }
.voice-col::-webkit-scrollbar-track { background: transparent; }
.voice-col::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Loading */
.voices-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
  flex-shrink: 0;
}

/* Light mode overrides */
[data-theme="light"] .voice-search-input { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .voice-cols-header { border-bottom-color: #e2e8f0; }
[data-theme="light"] .male-head   { background: rgba(59,130,246,.07);  color: #3b82f6; }
[data-theme="light"] .female-head { background: rgba(236,72,153,.07); color: #db2777; }
[data-theme="light"] .voice-col   { border-right-color: #e2e8f0; }
[data-theme="light"] .voice-item:hover { background: rgba(99,102,241,.06); }
[data-theme="light"] .voice-item.selected { background: rgba(99,102,241,.1); }
[data-theme="light"] .voice-item-name { color: #0f172a; }


/* ═══════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════════════════ */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .2s;
  flex-shrink: 0;
  color: var(--text-muted);
  padding: 0;
  width: 38px;
  height: 38px;
  min-width: unset;
}
.theme-toggle:hover {
  background: rgba(99,102,241,.15);
  border-color: var(--primary);
  color: var(--text);
}
/* In dark mode: show moon, hide sun */
.theme-toggle .icon-moon { display: flex; align-items: center; }
.theme-toggle .icon-sun  { display: none;  align-items: center; }
/* In light mode: show sun, hide moon */
.theme-toggle[data-theme-active="light"] .icon-moon { display: none;  }
.theme-toggle[data-theme-active="light"] .icon-sun  { display: flex; }
[data-theme="light"] .theme-toggle { background: rgba(0,0,0,.04); border-color: #cbd5e1; }


/* ═══════════════════════════════════════════════════════
   WYSIWYG EDITOR
   ═══════════════════════════════════════════════════════ */
.wysiwyg-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.wysiwyg-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 8px 10px;
  background: rgba(0,0,0,.15);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.wysiwyg-btn {
  border-radius: 6px; border: none; background: none;
  color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; font-family: serif;
  padding: 4px 8px; min-width: 26px; width: auto; height: auto;
}
.wysiwyg-btn:hover  { background: rgba(255,255,255,.1); color: var(--text); }
.wysiwyg-btn.active { background: rgba(99,102,241,.2);  color: var(--primary-light); }
.wysiwyg-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; flex-shrink: 0; }
.wysiwyg-mode-btn {
  margin-left: auto; padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: none; color: var(--text-muted);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .12s;
  white-space: nowrap; width: auto; height: auto;
}
.wysiwyg-mode-btn:hover, .wysiwyg-mode-btn.active {
  background: rgba(99,102,241,.15); color: var(--primary-light); border-color: var(--primary);
}
.wysiwyg-editor {
  min-height: 280px; padding: 16px; outline: none;
  font-size: 15px; line-height: 1.7; color: var(--text);
  background: transparent; overflow-y: auto;
}
.wysiwyg-editor h1,.wysiwyg-editor h2,.wysiwyg-editor h3,.wysiwyg-editor h4 {
  font-family: var(--font-display); margin: 16px 0 8px;
}
.wysiwyg-editor p   { margin-bottom: 12px; }
.wysiwyg-editor a   { color: var(--primary-light); }
.wysiwyg-editor ul,.wysiwyg-editor ol { margin: 8px 0 8px 24px; }
.wysiwyg-editor blockquote {
  border-left: 3px solid var(--primary); padding-left: 16px;
  margin: 12px 0; color: var(--text-muted); font-style: italic;
}
.wysiwyg-raw {
  display: none; width: 100%; min-height: 280px;
  font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.6;
  padding: 16px; background: rgba(0,0,0,.25); color: #a8ff78;
  border: none; resize: vertical; outline: none; border-radius: 0;
}
[data-theme="light"] .wysiwyg-toolbar { background: #f8fafc; border-bottom-color: #e2e8f0; }
[data-theme="light"] .wysiwyg-editor  { color: #0f172a; }
[data-theme="light"] .wysiwyg-raw     { background: #1e293b; }
