:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --border-card: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-1: #059669;
    --accent-2: #10b981;
    --accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --accent-glow: rgba(5, 150, 105, 0.2);
    --success: #10b981;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.05);
    --font: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Glass Card */
.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.85));
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-card:hover {
    border-color: rgba(5, 150, 105, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

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

/* Top Nav */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-card);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.upgrade-btn {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 3px 12px var(--accent-glow);
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px 30px;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Login Wall */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 20px 0 60px;
    align-items: start;
    position: relative;
}

.login-wall {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-lg);
}

.login-wall-content {
    max-width: 400px;
    text-align: center;
    padding: 40px !important;
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-wall h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.login-wall p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.controls-panel {
    max-height: 800px;
    overflow-y: auto;
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* Form Inputs */
.section-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin: 20px 0 12px;
    font-weight: 600;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-row > .input-group {
    flex: 1;
}

.input-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input, .input-group select {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.input-group input[type="color"] {
    height: 46px;
    padding: 4px;
    cursor: pointer;
}

/* Templates */
.template-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.template-btn {
    padding: 10px;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.template-btn:hover:not(.locked) {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.template-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

.template-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.pro-tag {
    background: #f59e0b;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Preview Area */
.email-mockup {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-card);
    color: #333;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.email-mockup-header {
    background: #f8fafc;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.mockup-dots {
    display: flex;
    gap: 6px;
    margin-right: 16px;
}

.mockup-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mockup-dots span:nth-child(1) { background: #ef4444; }
.mockup-dots span:nth-child(2) { background: #f59e0b; }
.mockup-dots span:nth-child(3) { background: #10b981; }

.email-mockup-body {
    padding: 40px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* Sections */
.section-wrapper {
    padding: 60px 0;
    text-align: center;
}

.section-title-large {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* Pricing */
.pricing-card {
    text-align: left;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent-1);
    box-shadow: 0 0 40px var(--accent-glow);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 10px 0 20px;
}

.price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-card li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.pricing-btn.free {
    background: #fff;
    border: 1px solid var(--border-card);
    color: var(--text-primary);
}

.pricing-btn.pro {
    background: var(--accent-gradient);
    color: #fff;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    margin-bottom: 16px;
    cursor: pointer;
}

.faq-item summary {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 0;
    outline: none;
}

.faq-item p {
    color: var(--text-secondary);
    padding: 10px 0;
    line-height: 1.6;
}

/* Beta Waitlist */
.beta-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.beta-form input {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    background: #fff;
    color: var(--text-primary);
    outline: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: #fff;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-card);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

@media (max-width: 800px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .controls-panel {
        max-height: none;
    }
}
