:root {
    --bg: #090e17;
    --surface: #131a26;
    --surface-hover: #1e2836;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #22d3ee;
    --border: rgba(255,255,255,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 7rem 20px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(9,14,23,0) 70%);
    z-index: -1;
}

.tagline {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

h1 span {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 20px;
}

.feature-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Code integration */
.code-section {
    max-width: 800px;
    margin: 4rem auto 8rem auto;
    padding: 0 20px;
    text-align: center;
}

.code-window {
    background: #0f141e;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    border: 1px solid var(--border);
    position: relative;
    margin-top: 2rem;
}

.code-window::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

pre, code {
    font-family: 'Courier New', Courier, monospace;
}
.code-window pre {
    margin-top: 2rem;
    color: #a5b4fc;
    overflow-x: auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Container Wrapper Docs */
.doc-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 20px;
    display: flex;
    gap: 3rem;
}

.doc-content {
    flex: 1;
}

/* Form Builder Styling */
.builder-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.builder-panel {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.builder-panel h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--accent);
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.preview-panel {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.preview-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    min-height: 150px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333; /* Switch to light mode inside preview to check widget cleanly */
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .builder-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .hero { padding: 4rem 20px; }
    .nav-links { display: none; }
    .doc-container { flex-direction: column; }
}
