:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

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

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

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

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background: var(--gray-lighter);
    color: var(--dark);
}

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

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    margin-top: 72px;
}

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

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

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

.hero-description {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

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

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    padding-top: 3rem;
    border-top: 1px solid var(--gray-light);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.875rem;
}

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

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

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

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

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

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--gray);
    line-height: 1.7;
}

/* Demo Section */
.demo {
    padding: 6rem 0;
    background: var(--gray-lighter);
    position: relative;
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

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

.upload-area {
    border: 2px dashed var(--gray-light);
    border-radius: 0.75rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light)10;
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light)20;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--gray);
    margin: 0 auto 1rem;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

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

.upload-buttons button {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
}

.demo-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-group label {
    font-weight: 500;
    color: var(--dark);
}

.slider-group input[type="range"] {
    width: 100%;
}

.result-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-lighter);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s;
}

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

.result-content {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-pane {
    display: none;
    width: 100%;
}

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

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

.result-placeholder svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
}

.result-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

/* Hide placeholder when image is visible */
.tab-pane .result-image[style*="display: block"] ~ .result-placeholder,
.tab-pane .result-image:not([style*="display: none"]) ~ .result-placeholder {
    display: none;
}

.result-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-lighter);
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-around;
}

.info-item {
    text-align: center;
}

.info-label {
    display: block;
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.info-value {
    display: block;
    font-weight: 700;
    color: var(--dark);
    font-size: 1.125rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--dark);
}

/* Pricing Section */
.pricing {
    padding: 6rem 0;
}

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

.pricing-card {
    background: var(--white);
    border: 2px solid var(--gray-lighter);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-tier {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pricing-price {
    margin-bottom: 2rem;
}

.currency {
    font-size: 1.5rem;
    color: var(--gray);
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark);
}

.period {
    color: var(--gray);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--gray);
    border-bottom: 1px solid var(--gray-lighter);
}

/* Examples Section */
.examples {
    padding: 6rem 0;
    background: var(--white);
}

.example-workflow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.workflow-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    text-align: center;
}

.workflow-step {
    width: 100%;
    background: var(--gray-lighter);
    padding: 2rem;
    border-radius: 1rem;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, #667eea 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.step-image {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
}

.step-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.step-results-grid img {
    width: 100%;
    height: auto;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-note {
    text-align: center;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    margin: 1rem 0 0 0;
}

.workflow-arrow-down {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.workflow-arrow-down svg {
    width: 100%;
    height: 100%;
    stroke-width: 3;
}

.workflow-arrow {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 8rem;
}

.workflow-arrow svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

/* Old examples grid styles */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.example-item {
    text-align: center;
}

.example-images {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gray-lighter);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.example-before,
.example-after {
    flex: 1;
    position: relative;
}

.example-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.example-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.example-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px dashed var(--gray-light);
    border-radius: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

.example-arrow {
    width: 32px;
    height: 32px;
    color: var(--primary);
    flex-shrink: 0;
}
@media (max-width: 1024px) {
    .example-workflow {
        max-width: 100%;
    }
    
    .step-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .step-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}   }
    
    .step-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .step-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-tagline {
    margin-top: 0.5rem;
    color: var(--gray);
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 150px;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--primary-light);
}

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

/* Camera Modal */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.camera-container {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#cameraVideo {
    width: 100%;
    height: auto;
    max-height: 70vh;
    border-radius: 0.5rem;
    object-fit: contain;
}

.camera-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.camera-controls button {
    padding: 0.75rem 2rem;
}

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

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .pricing-card.featured {
        transform: none;
    }

    .nav-links {
        display: none;
    }

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

    .example-images {
        flex-direction: column;
    }

    .example-arrow {
        transform: rotate(90deg);
    }

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

/* Advanced Demo Tabs */
.demo-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--gray-light);
    flex-wrap: wrap;
}

.demo-tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
    margin-bottom: -2px;
}

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

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

.demo-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.demo-pane.active {
    display: block;
}

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

/* Responsive adjustments for demo tabs */
@media (max-width: 768px) {
    .demo-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .demo-tab-button {
        padding: 0.75rem 1rem;
        text-align: left;
    }
}
