/* ============================================
   EXCELMEDIA TEMPLATES — MARKETPLACE STYLE
   Same brand DNA as ExcelMediaUK 2.0
   ============================================ */

/* === VARIABLES === */
:root {
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #191919;
    --text: #ededed;
    --text-secondary: #a1a1a1;
    --text-muted: #666666;
    --accent: #ffffff;
    --accent-blue: #3b82f6;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #333 #000;
}

html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track { background: #000; }
html::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

body {
    font-family: var(--font-primary);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
button, input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === NAVIGATION === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s ease;
}

.nav.scrolled {
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: opacity var(--transition-fast);
}

.nav-logo:hover { opacity: 0.8; }

.logo-accent {
    color: var(--text-muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.nav-links a:hover { color: var(--text); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.nav-link-muted {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.nav-link-muted:hover { color: var(--text); }

.nav-cta-btn {
    padding: 8px 18px;
    font-size: 0.8125rem;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-cta-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.25);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu.active { opacity: 1; visibility: visible; }

.mobile-menu-links {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu-links a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    transition: color var(--transition-fast);
}

.mobile-menu-links a:hover { color: var(--text-muted); }

/* === HERO === */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 60%;
    background: radial-gradient(ellipse at center bottom, rgba(30,28,26,0.8) 0%, rgba(18,16,14,0.4) 35%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero > .container { position: relative; z-index: 1; }

.hero-avail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(190,190,205,0.6);
    letter-spacing: 0.04em;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-avail-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-title-bold {
    font-weight: 800;
    color: #fff;
}

.hero-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-stat-lbl {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.25);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-full { width: 100%; }

/* === TRUST BAR === */
.trust-bar {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.trust-bar .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.trust-text {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.trust-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.trust-logos span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.trust-logos span:hover { opacity: 0.8; }

/* === SECTION SHARED === */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.section-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === TEMPLATES SECTION === */
.templates {
    padding: 100px 0;
}

.template-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 7px 16px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.filter-btn.active {
    color: var(--text);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.template-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.template-preview {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
    overflow: hidden;
}

.template-iframe-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.template-iframe-wrap iframe {
    width: 1440px;
    height: 900px;
    border: none;
    transform-origin: top left;
    transform: scale(0.278);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 768px) {
    .template-iframe-wrap iframe {
        width: 1200px;
        height: 750px;
        transform: scale(0.25);
    }
}

.template-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--text-muted);
}

.template-placeholder svg {
    opacity: 0.3;
}

.template-placeholder span {
    font-size: 0.75rem;
    opacity: 0.5;
}

.template-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.badge {
    padding: 3px 10px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
}

.badge-new {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-popular {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.template-info {
    padding: 20px;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.template-category {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.template-price {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.template-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.template-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.template-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.template-tags span {
    padding: 3px 10px;
    font-size: 0.6875rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.template-config-tags {
    display: flex;
    gap: 5px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.template-config-tags span {
    padding: 3px 10px;
    font-size: 0.625rem;
    font-weight: 500;
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.08);
    border-radius: 100px;
}

.template-price small {
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-muted);
}

.template-actions {
    display: flex;
    gap: 8px;
}

.template-card.hidden {
    display: none;
}

/* --- Template Preview Hover Overlay --- */
.template-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.template-card:hover .template-hover-overlay {
    opacity: 1;
}

/* ============================================
   MOCKUP WEBSITE PREVIEWS
   ============================================ */
.template-mockup {
    width: 100%;
    height: 100%;
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
}

/* --- Shared Mock Elements --- */
.mock-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    min-height: 16px;
}

.mock-nav-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    min-height: 16px;
}

.mock-logo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

.mock-logo-text {
    width: 32px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.5);
}

.mock-nav-links {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.mock-nav-links span {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
}

/* --- Mock Hero Sections --- */
.mock-hero-dark,
.mock-hero-light,
.mock-hero-gradient,
.mock-hero-business,
.mock-hero-split,
.mock-player-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    flex: 1;
    min-height: 0;
}

.mock-hero-dark {
    background: linear-gradient(180deg, rgba(20,18,25,0.9), rgba(10,8,16,1));
}

.mock-hero-light {
    background: linear-gradient(180deg, #f5f5f0, #eeeee8);
}

.mock-hero-gradient {
    background: linear-gradient(135deg, #0f172a, #1e3a5f, #0f172a);
}

.mock-hero-business {
    background: linear-gradient(180deg, #0a0a0a, #111);
}

.mock-hero-split {
    flex-direction: row;
    gap: 8px;
    background: #0a0a0a;
}

.mock-player-hero {
    background: linear-gradient(180deg, #0d0d15, #161622);
    gap: 4px;
}

.mock-badge-sm {
    width: 40px;
    height: 4px;
    border-radius: 10px;
    background: rgba(74,222,128,0.3);
    margin-bottom: 4px;
}

.mock-headline-lg {
    width: 70%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.6);
    margin-bottom: 3px;
}

.mock-headline-md {
    width: 50%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.25);
    margin-bottom: 6px;
}

.mock-subtext {
    width: 55%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
    margin-bottom: 6px;
}

.mock-hero-light .mock-headline-lg {
    background: rgba(0,0,0,0.7);
}

.mock-hero-light .mock-subtext {
    background: rgba(0,0,0,0.2);
}

.mock-btn-row {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.mock-btn-primary,
.mock-btn-outline,
.mock-btn-dark,
.mock-btn-accent {
    height: 6px;
    width: 28px;
    border-radius: 3px;
}

.mock-btn-primary { background: #fff; }
.mock-btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.3); }
.mock-btn-dark { background: #111; }
.mock-btn-accent { background: #3b82f6; }

/* --- Esports Mockup --- */
.mockup-esports {
    background: #0a0812;
}

.mock-roster {
    display: flex;
    gap: 3px;
    padding: 4px 8px;
    justify-content: center;
}

.mock-player {
    width: 18px;
    height: 22px;
    border-radius: 3px;
    background: linear-gradient(180deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-sponsors {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 4px 8px;
}

.mock-sponsors span {
    width: 20px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
}

/* --- Agency Mockup --- */
.mockup-agency {
    background: #f5f5f0;
}

.mock-portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 4px 8px;
}

.mock-port-item {
    aspect-ratio: 4/3;
    border-radius: 3px;
    background: linear-gradient(135deg, #ddd, #ccc);
}

.mock-port-item:nth-child(2) { background: linear-gradient(135deg, #c8c8c0, #b8b8b0); }
.mock-port-item:nth-child(3) { background: linear-gradient(135deg, #e0ddd6, #d0cdc6); }
.mock-port-item:nth-child(4) { background: linear-gradient(135deg, #d5d0c8, #c5c0b8); }

.mock-testimonial {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px 8px;
    align-items: center;
}

.mock-quote-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.mock-quote-lines span {
    height: 2px;
    border-radius: 1px;
    background: rgba(0,0,0,0.15);
}

.mock-quote-lines span:first-child { width: 50px; }
.mock-quote-lines span:last-child { width: 35px; }

.mock-avatar-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.mock-avatar {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bbb;
}

.mock-name-line {
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: rgba(0,0,0,0.2);
}

/* --- SaaS Mockup --- */
.mockup-saas {
    background: #0f172a;
}

.mock-features-row {
    display: flex;
    gap: 3px;
    padding: 4px 8px;
}

.mock-feature-card {
    flex: 1;
    height: 18px;
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-pricing-mini {
    display: flex;
    gap: 3px;
    padding: 4px 8px;
}

.mock-price-card {
    flex: 1;
    height: 24px;
    border-radius: 3px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-price-featured {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
}

/* --- Portfolio Mockup --- */
.mockup-portfolio {
    background: #0a0a0a;
}

.mock-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.mock-hero-image {
    width: 40%;
    height: 90%;
    border-radius: 4px;
    background: linear-gradient(135deg, #222, #1a1a1a);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 4px 8px;
}

.mock-project {
    height: 16px;
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-project.tall {
    grid-row: span 2;
    height: auto;
}

/* --- Player Card Mockup --- */
.mockup-player {
    background: #0d0d15;
}

.mock-player-avatar-lg {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border: 1px solid rgba(255,255,255,0.1);
}

.mock-social-row {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.mock-social-row span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-stats-row {
    display: flex;
    gap: 3px;
    padding: 4px 8px;
}

.mock-stat-box {
    flex: 1;
    height: 18px;
    border-radius: 3px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

/* --- Business Mockup --- */
.mockup-business {
    background: #0a0a0a;
}

.mock-services-grid {
    display: flex;
    gap: 3px;
    padding: 4px 8px;
}

.mock-service {
    flex: 1;
    height: 22px;
    border-radius: 3px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.mock-team-row {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    justify-content: center;
}

.mock-team-member {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #222, #1a1a1a);
    border: 1px solid rgba(255,255,255,0.06);
}

/* === PRICING === */
.pricing {
    padding: 100px 0;
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toggle-label.active { color: var(--text); font-weight: 500; }

.toggle-save {
    padding: 2px 8px;
    font-size: 0.625rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    cursor: pointer;
    transition: background var(--transition-fast);
    padding: 0;
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--text);
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(20px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    transition: border-color var(--transition);
}

.pricing-card:hover { border-color: var(--border-hover); }

.pricing-card-featured {
    border-color: rgba(255,255,255,0.15);
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, var(--bg-card) 100%);
}

.pricing-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--text);
    color: var(--bg);
    border-radius: 100px;
    white-space: nowrap;
}

.pricing-header {
    margin-bottom: 24px;
}

.pricing-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.pricing-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.pricing-urgency {
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(190,190,205,0.6);
    margin-top: 10px;
    letter-spacing: 0.03em;
}

.pricing-deal {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pricing-deal strong {
    color: #fff;
}

.pricing-amount {
    margin-bottom: 4px;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.price-period {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.pricing-monthly-addon {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pricing-monthly-addon strong {
    color: var(--text);
    font-weight: 700;
}

.pricing-features {
    list-style: none;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pricing-features li svg {
    flex-shrink: 0;
    color: #4ade80;
}

.pricing-features li.feature-disabled {
    color: var(--text-muted);
    opacity: 0.5;
}

.pricing-features li.feature-disabled svg {
    color: var(--text-muted);
}

/* === HOW IT WORKS === */
.how-it-works {
    padding: 100px 0;
}

.steps-grid {
    display: flex;
    align-items: center;
    gap: 20px;
}

.step-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    transition: border-color var(--transition);
}

.step-card:hover { border-color: var(--border-hover); }

.step-number {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.3;
}

/* === INCLUDED === */
.included {
    padding: 100px 0;
}

.included-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.included-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: border-color var(--transition);
}

.included-card:hover { border-color: var(--border-hover); }

.included-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.included-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.included-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === COMPARISON === */
.comparison {
    padding: 100px 0;
}

.comparison-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border);
}

.comparison-row:last-child { border-bottom: none; }

.comparison-header {
    background: rgba(255,255,255,0.02);
}

.comparison-header .comparison-col {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.comparison-feature {
    padding: 16px 24px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.comparison-col {
    padding: 16px 24px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    border-left: 1px solid var(--border);
}

.comparison-col.highlight {
    color: var(--text);
    font-weight: 500;
}

/* === FAQ === */
.faq {
    padding: 100px 0;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item:hover { border-color: var(--border-hover); }

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-question svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question svg {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 20px 18px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

/* === CTA === */
.cta-section {
    padding: 80px 0 100px;
}

.cta-block {
    text-align: center;
    padding: 64px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.cta-avail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(190,190,205,0.6);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.cta-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.cta-guarantee {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 16px;
    letter-spacing: 0.01em;
}

/* === FOOTER === */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-logo {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-imprint {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-imprint span {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    font-size: 0.6875rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-legal a:hover { color: var(--text); }

/* === REVEAL ANIMATION === */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto;
    }

    .included-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-right { display: none; }
    .hamburger { display: flex; }

    .hero { padding: 120px 0 60px; }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .hero-stat-divider {
        width: 32px;
        height: 1px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .included-grid {
        grid-template-columns: 1fr;
    }

    .comparison-row {
        grid-template-columns: 1fr;
    }

    .comparison-col {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .comparison-feature {
        font-weight: 500;
        color: var(--text);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cta-block {
        padding: 40px 24px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .template-filters {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .template-filters::-webkit-scrollbar { display: none; }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CUSTOMISE BUTTON
   ============================================ */
.btn-edit {
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93bbfd;
}

/* ============================================
   EDITOR OVERLAY
   ============================================ */
.editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.editor-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Top Bar --- */
.editor-topbar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.editor-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.editor-back:hover {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border-hover);
}

.editor-template-name {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.editor-badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.editor-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Body: Sidebar + Preview --- */
.editor-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* --- Sidebar --- */
.editor-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--bg-secondary);
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.editor-sidebar::-webkit-scrollbar { width: 4px; }
.editor-sidebar::-webkit-scrollbar-track { background: transparent; }
.editor-sidebar::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.editor-section {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.editor-section:last-of-type {
    border-bottom: none;
}

.editor-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.editor-section-title svg {
    color: var(--text-muted);
    opacity: 0.7;
}

.editor-control {
    margin-bottom: 12px;
}

.editor-control:last-child {
    margin-bottom: 0;
}

.editor-control label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Color inputs */
.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    transition: border-color var(--transition-fast);
}

.color-input-wrap:hover {
    border-color: var(--border-hover);
}

.color-input-wrap input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-input-wrap input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-wrap input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-hex {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* Select */
.editor-control select {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.editor-control select:hover,
.editor-control select:focus {
    border-color: var(--border-hover);
}

.editor-control option {
    background: var(--bg-card);
    color: var(--text);
}

/* Range slider */
.range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-wrap input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.range-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.range-wrap input[type="range"]::-webkit-slider-thumb:hover {
    border-color: #60a5fa;
}

.range-val {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
}

/* Toggle switches */
.editor-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-toggle-row label:first-child {
    margin-bottom: 0;
}

.editor-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.editor-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.editor-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.editor-switch-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--transition-fast);
}

.editor-switch input:checked + .editor-switch-slider {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.editor-switch input:checked + .editor-switch-slider::before {
    transform: translateX(16px);
    background: #60a5fa;
}

/* Sidebar CTA */
.editor-sidebar-cta {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.editor-sidebar-cta p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.editor-sidebar-note {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* --- Editor Mode Tabs (Topbar Center) --- */
.editor-topbar-center {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 3px;
}

.editor-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.editor-mode-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.editor-mode-btn.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* --- Editor Panels --- */
.editor-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.editor-panel::-webkit-scrollbar { width: 4px; }
.editor-panel::-webkit-scrollbar-track { background: transparent; }
.editor-panel::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* --- Panel Tip --- */
.editor-panel-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #93c5fd;
    margin-bottom: 16px;
}

.editor-panel-tip svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #60a5fa;
}

/* --- Upload Zone --- */
.editor-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.editor-upload-zone:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.03);
}

.editor-upload-zone.drag-over {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.editor-upload-zone svg {
    color: var(--text-muted);
}

.editor-upload-zone span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 0.6875rem !important;
    color: var(--text-muted) !important;
}

/* --- Text Input --- */
.editor-text-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.editor-text-input:focus {
    border-color: rgba(255,255,255,0.25);
}

/* --- Image Preview --- */
.editor-image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-top: 8px;
}

.editor-image-preview img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 6px;
    object-fit: contain;
}

.editor-image-preview span {
    font-size: 0.75rem;
    color: #93c5fd;
}

.editor-image-clear {
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-image-clear:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* --- Section Toggles --- */
.editor-section-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.section-toggles-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.section-toggle-item:hover {
    background: rgba(255,255,255,0.03);
}

.section-toggle-item label:first-child {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: default;
}

/* --- AI Chat Panel --- */
.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-avatar svg {
    color: #fff;
}

.ai-chat-header strong {
    display: block;
    font-size: 0.875rem;
    color: #fff;
}

.ai-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ai-status.online {
    color: #22c55e;
}

.ai-settings-toggle {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-settings-toggle:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border-color: rgba(255,255,255,0.15);
}

.ai-settings-toggle.active {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.3);
    color: #60a5fa;
}

/* --- AI Settings Drawer --- */
.ai-settings {
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-settings-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ai-settings-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ai-settings-field select {
    width: 100%;
    padding: 7px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.ai-settings-field select option {
    background: #1a1a1a;
    color: #fff;
}

.ai-key-wrap {
    position: relative;
    display: flex;
}

.ai-key-wrap .editor-text-input {
    padding-right: 36px;
}

.ai-key-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-key-eye:hover {
    color: var(--text-secondary);
}

.ai-key-hint {
    font-size: 0.6875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.ai-key-hint code {
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 12px;
    min-height: 0;
}

.ai-msg {
    max-width: 95%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.ai-msg p {
    margin: 0;
}

.ai-msg-bot {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    align-self: flex-start;
}

.ai-msg-user {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #e0e7ff;
    align-self: flex-end;
}

.ai-msg-success {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #86efac;
    align-self: flex-start;
}

.ai-msg-error {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #fca5a5;
    align-self: flex-start;
}

.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ai-suggestion {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-suggestion:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.ai-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.ai-chat-input-wrap {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.ai-chat-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: rgba(59, 130, 246, 0.4);
}

.ai-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.ai-send-btn:hover { opacity: 0.85; }

/* --- Content Edit Glow (injected into iframe) --- */
/* These are injected by JS into the iframe, listed here for reference */

/* --- Preview Area --- */
.editor-preview {
    flex: 1;
    position: relative;
    background: #080808;
    overflow: hidden;
}

.editor-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.editor-watermark {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   PURCHASE MODAL
   ============================================ */
.purchase-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.purchase-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.purchase-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 520px;
    width: 100%;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.purchase-modal-overlay.active .purchase-modal {
    transform: translateY(0) scale(1);
}

.purchase-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.purchase-modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.purchase-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.purchase-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #60a5fa;
}

.purchase-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.purchase-modal-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Price row */
.purchase-modal-price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.purchase-price-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 100px;
}

.purchase-price-amount {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.purchase-price-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.purchase-plus {
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--text-muted);
}

.purchase-plans {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.purchase-plan {
    position: relative;
    display: block;
    cursor: pointer;
}

.purchase-plan input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.purchase-plan-inner {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
}

.purchase-plan input:checked ~ .purchase-plan-inner {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.06);
}

.purchase-plan:hover .purchase-plan-inner {
    border-color: var(--border-hover);
}

.purchase-plan-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.purchase-plan-price {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    letter-spacing: -0.01em;
}

.purchase-plan-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.purchase-plan-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
}

.purchase-plan-desc {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: block;
}

/* Features */
.purchase-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Checkout button */
.purchase-checkout-btn {
    padding: 14px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.purchase-modal-note {
    text-align: center;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ============================================
   EDITOR RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .editor-body {
        flex-direction: column;
    }

    .editor-sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow: hidden;
    }

    .editor-topbar-center {
        display: none;
    }

    .editor-topbar-right .btn-ghost {
        display: none;
    }

    .purchase-modal-price-row {
        flex-direction: column;
    }

    .purchase-modal {
        padding: 24px;
    }
}
