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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --background: #0f0f1e;
    --surface: #1a1a2e;
    --surface-light: #25254a;
    --text: #ffffff;
    --text-muted: #a0a0c0;
    --border: #2d2d4a;
    --success: #10b981;
    --pro-badge: #fbbf24;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.logo h1 {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.upgrade-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

/* Control Panel */
.control-panel {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.control-panel h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 10px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.control-group select {
    cursor: pointer;
}

.control-group input[type="range"] {
    padding: 0;
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.pro-feature {
    color: var(--pro-badge);
}

.pro-only {
    opacity: 0.6;
}

.pro-only input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.export-btn {
    width: 100%;
    padding: 14px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 20px;
}

.export-btn:hover {
    transform: translateY(-2px);
}

.pro-features-info {
    background: var(--surface-light);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.pro-features-info h4 {
    margin-bottom: 12px;
    font-size: 16px;
}

.pro-features-info ul {
    list-style: none;
    margin-bottom: 16px;
}

.pro-features-info ul li {
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.pro-features-info ul li:before {
    content: "✨ ";
    color: var(--pro-badge);
}

.cta-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
}

/* Preview Area */
.preview-area {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 20px;
}

.editor-container,
.preview-container {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.editor-container h3,
.preview-container h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

#codeInput {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.preview-canvas {
    padding: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    transition: background 0.3s;
}

.preview-canvas.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.preview-canvas.gradient-2 {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.preview-canvas.gradient-3 {
    background: linear-gradient(135deg, #f472b6 0%, #fb923c 100%);
}

.preview-canvas.gradient-4 {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.preview-canvas.gradient-5 {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.code-window {
    background: #282c34;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    position: relative;
}

.window-header {
    background: #21252b;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-controls .control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-controls .red {
    background: #ff5f56;
}

.window-controls .yellow {
    background: #ffbd2e;
}

.window-controls .green {
    background: #27c93f;
}

.code-container {
    padding: 20px;
    overflow-x: auto;
}

.code-container pre {
    margin: 0;
}

.code-container code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.watermark {
    position: absolute;
    bottom: 12px;
    right: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.watermark.hidden {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
}

.close:hover {
    color: var(--text);
}

.modal-content h2 {
    margin-bottom: 30px;
    text-align: center;
    font-size: 32px;
}

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

.pricing-card {
    background: var(--surface-light);
    padding: 32px;
    border-radius: 12px;
    border: 2px solid var(--border);
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.price {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price span {
    font-size: 18px;
    color: var(--text-muted);
}

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

.pricing-card ul li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.pricing-btn {
    width: 100%;
    padding: 14px;
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pricing-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary);
}

.pricing-btn.featured-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
}

.pricing-btn.current {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .control-panel {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .preview-canvas {
        padding: 30px;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }
}

/* Auth UI Styles */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.user-email {
    color: #1f2937;
    font-weight: 500;
    margin-right: 12px;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
}

.plan-badge.plan-free {
    background: #e5e7eb;
    color: #6b7280;
}

.plan-badge.plan-pro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.plan-badge.plan-team {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Auth Modal Styles */
.auth-modal {
    max-width: 400px;
    padding: 40px;
}

.auth-modal h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #1f2937;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
    font-size: 14px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 40px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-feature {
    font-size: 16px;
    font-weight: 500;
}

.hero-cta {
    margin-top: 40px;
}

.cta-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.cta-note {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.9;
}

/* Social Proof Banner */
.social-proof-banner {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 0 40px 40px;
}

.social-proof-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.social-proof-item {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* How It Works */
.how-it-works {
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 40px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #1f2937;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #1f2937;
}

.step p {
    color: #6b7280;
    line-height: 1.6;
}

/* Examples Gallery */
.examples-gallery {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 60px 40px;
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
    border-radius: 30px;
}

.examples-gallery h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 12px;
    color: #1f2937;
}

.gallery-subtitle {
    text-align: center;
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 50px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.example-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.example-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.example-preview {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.example-preview[data-background="gradient-1"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.example-preview[data-background="gradient-2"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.example-preview[data-background="gradient-3"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.code-window-example {
    background: #282c34;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.window-header-example {
    background: #21252b;
    padding: 12px;
    border-bottom: 1px solid #181a1f;
}

.window-controls-example {
    display: flex;
    gap: 8px;
}

.control-example {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control-example.red {
    background: #ff5f56;
}

.control-example.yellow {
    background: #ffbd2e;
}

.control-example.green {
    background: #27c93f;
}

.code-content-example {
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.code-content-example pre {
    margin: 0;
    overflow: visible;
}

.code-content-example code {
    background: transparent !important;
    padding: 0 !important;
    color: #abb2bf;
}

.example-info {
    padding: 20px;
    text-align: center;
}

.example-info h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #1f2937;
}

.example-info p {
    font-size: 14px;
    color: #6b7280;
}

.gallery-cta {
    text-align: center;
    margin-top: 50px;
}

.cta-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-features {
        gap: 15px;
    }

    .hero-feature {
        font-size: 14px;
    }

    .cta-primary {
        padding: 14px 30px;
        font-size: 16px;
    }

    .social-proof-content {
        gap: 20px;
    }

    .how-it-works h2 {
        font-size: 28px;
    }

    .steps {
        gap: 30px;
    }

    .examples-gallery {
        padding: 40px 20px;
        margin-bottom: 40px;
    }

    .examples-gallery h2 {
        font-size: 28px;
    }

    .gallery-subtitle {
        font-size: 16px;
    }

    .examples-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .code-content-example {
        font-size: 12px;
    }
}
