:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-800: #1e293b;
    --dark-700: #334155;
    --dark-600: #475569;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--gray-100);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray-600);
}

/* How It Works */
.how-it-works {
    padding: 6rem 0;
    background: var(--gray-100);
}

.steps {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--gray-600);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--dark);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-800);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    opacity: 0.8;
    margin-top: 1rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.6;
}

/* App Page */
.app-container {
    min-height: calc(100vh - 64px);
    padding: 2rem 0;
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.app-header p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gray-200);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Generator Grid */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-section,
.output-section {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
}

.config-controls {
    display: flex;
    gap: 0.5rem;
}

.select-input,
.text-input {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-input:focus,
.text-input:focus {
    outline: none;
    border-color: var(--primary);
}

.code-input {
    width: 100%;
    height: 400px;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
}

.code-output {
    min-height: 400px;
    background: var(--dark);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.code-output pre {
    margin: 0;
}

.code-output code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--gray-400);
    text-align: center;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-hint {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.metadata {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.metadata-item {
    display: flex;
    flex-direction: column;
}

.metadata-label {
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metadata-value {
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Workflow Generator */
.workflow-generator {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.workflow-config,
.workflow-output {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.text-input {
    width: 100%;
    padding: 0.75rem 1rem;
}

.select-input {
    width: 100%;
}

.instructions {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.instructions h3 {
    margin-bottom: 0.5rem;
}

.instructions ol {
    margin-left: 1.5rem;
}

.instructions code {
    background: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

/* Loading States */
.btn-loader {
    display: inline-block;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .generator-grid,
    .workflow-generator {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .config-controls {
        flex-wrap: wrap;
    }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
}
