/* ====================================
   Modern Neon/Pale Color Scheme
   ==================================== */

:root {
    /* Base colors - pale/dark background */
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;

    /* Neon accents */
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-blue: #6366f1;
    --neon-pink: #ec4899;
    --neon-green: #10b981;

    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* UI elements */
    --border-color: rgba(99, 102, 241, 0.3);
    --card-bg: rgba(26, 26, 46, 0.8);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--neon-blue), var(--neon-magenta));
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15), transparent 70%);
}

/* ====================================
   Reset & Base Styles
   ==================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ====================================
   Typography
   ==================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-secondary);
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--neon-cyan);
}

/* ====================================
   Layout
   ==================================== */

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

.section {
    padding: 6rem 0;
    position: relative;
}

/* ====================================
   Navigation
   ==================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

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

.nav-links a:hover {
    color: var(--neon-cyan);
}

/* ====================================
   Hero Section
   ==================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-glow);
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--neon-cyan);
    margin-bottom: 2rem;
    font-weight: 500;
}

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

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

/* ====================================
   Buttons
   ==================================== */

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--neon-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 255, 255, 0.1);
}

/* ====================================
   Features Section
   ==================================== */

.features {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

/* ====================================
   Demo Section
   ==================================== */

.demos {
    background: var(--bg-primary);
}

.demo-container {
    display: grid;
    gap: 4rem;
    margin-top: 3rem;
}

.demo-item {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.demo-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.demo-header h3 {
    margin-bottom: 0.5rem;
}

.demo-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    min-height: 500px;
}

.demo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 3rem;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.demo-controls {
    background: var(--bg-secondary);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* IDE-style property panel */
.property-panel {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.property-panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.property-panel-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-panel-body {
    padding: 0;
}

.property-section {
    border-bottom: 1px solid var(--border-color);
}

.property-section-title {
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    color: var(--neon-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Demo-specific styles */
.color-box {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    border: 2px dashed var(--neon-cyan);
    position: relative;
    transition: background 0.2s;
}

.color-box::before,
.color-box::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--neon-cyan);
    border-radius: 50%;
}

.color-box::before { top: -5px; left: -5px; }
.color-box::after { bottom: -5px; right: -5px; }

.slider-group {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: space-between;
}

.slider-group label {
    display: grid;
    grid-template-columns: 20px 1fr 45px;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
}

.slider-label {
    color: var(--text-muted);
    font-weight: 600;
}

.slider-group input[type="range"] {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--neon-cyan);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--neon-cyan);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.slider-group input[type="range"]::-moz-range-thumb:hover {
    background: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.slider-value {
    text-align: right;
    color: var(--neon-cyan);
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.property-editor {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.property-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    align-items: center;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.property-row:last-child {
    border-bottom: none;
}

.property-name {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.property-value {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.property-value:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(99, 102, 241, 0.05);
}

.property-value.formula {
    color: var(--neon-cyan);
    font-weight: 600;
}

.property-value.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.property-value.error {
    border-color: #ef4444;
    color: #ef4444;
}

/* Form demo */
.demo-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

input.text--input {
    background: transparent;
    border: 0;
    color: var(--neon-cyan);
    font-weight: 600;
}

.form-group input.text--input {
    border-bottom: 1px solid;
}

input.text--input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.3),
                0 0 20px rgba(0, 255, 255, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(99, 102, 241, 0.05);
}

.form-group input.error {
    border-color: #ef4444;
}

.form-group input.success {
    border-color: var(--neon-green);
}

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: -0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error::before {
    content: '⚠';
}

.form-success {
    color: var(--neon-green);
    font-size: 0.85rem;
    margin-top: -0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-success::before {
    content: '✓';
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====================================
   About Section
   ==================================== */

.about {
    background: var(--bg-secondary);
}

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

.about-content h2 {
    text-align: center;
    margin-bottom: 48px;
}

.about-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* ====================================
   Newsletter Section
   ==================================== */

.newsletter {
    background: var(--bg-primary);
    text-align: center;
}

.newsletter-form {
    max-width: 500px;
    margin: 2rem auto 0;
    display: flex;
    gap: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
}

.newsletter-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.newsletter-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}

.newsletter-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* ====================================
   Footer
   ==================================== */

.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--neon-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .demo-body {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .section {
        padding: 4rem 0;
    }
}

/* ====================================
   Animations
   ==================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}
