:root {
    /* Light mode palette */
    --background: 0 0% 100%; /* white */
    --foreground: 222.2 47.4% 11.2%; /* near-black */
    --primary: 262 83% 58%;
    --primary-glow: 270 100% 75%;
    --accent: 330 100% 71%;
    --border: 214.3 31.8% 91.4%; /* light gray border */
    --muted: 210 20% 98%; /* subtle light background */
    --muted-foreground: 215.4 16.3% 34%; /* medium gray for secondary text */
    --card-shadow: 0 10px 40px -15px hsl(262 83% 58% / 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page-wrapper {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.background-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
    hsl(var(--background)) 0%,
    hsl(262 83% 58% / 0.05) 50%,
    hsl(var(--background)) 100%);
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, hsl(var(--border)) 1px, transparent 1px),
        linear-gradient(to bottom, hsl(var(--border)) 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
}

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

.hero-section {
    position: relative;
    padding: 2rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.6s ease-out;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid hsl(var(--primary) / 0.2);
    background: hsl(var(--primary) / 0.05);
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--primary));
    width: fit-content;
}

.badge .icon {
    width: 1rem;
    height: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.gradient-text {
    background: linear-gradient(135deg,
    hsl(var(--primary)),
    hsl(var(--primary-glow)),
    hsl(var(--accent)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-text {
    color: hsl(var(--foreground));
}

.sub-text {
    color: hsl(var(--muted-foreground));
    font-size: 2rem;
}

@media (min-width: 1024px) {
    .sub-text {
        font-size: 2.5rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 28rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
    color: white;
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsl(var(--primary) / 0.4);
}

.btn-outline {
    background: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-outline:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary) / 0.5);
}

.btn-full {
    width: 100%;
}

/* Disabled button state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.stats {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.form-card {
    backdrop-filter: blur(10px);
    background: hsl(var(--background) / 0.8);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    box-shadow: var(--card-shadow);
}

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

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: hsl(var(--muted-foreground));
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

label {
    font-size: 0.875rem;
    font-weight: 500;
}

.text-input,
.textarea,
.file-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}

.text-input:focus,
.textarea:focus,
.file-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.file-input {
    cursor: pointer;
}

/* Make native file input look great */
.file-input::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.25);
}

/* Safari/older Chromium fallback */
.file-input::-webkit-file-upload-button {
    margin-right: 0.75rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.25);
}

.file-input:hover::file-selector-button,
.file-input:hover::-webkit-file-upload-button {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px hsl(var(--primary) / 0.35);
}

.file-input:focus-visible {
    outline: none;
}

.textarea {
    resize: vertical;
    font-family: inherit;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.file-name .icon {
    width: 1rem;
    height: 1rem;
}

.processing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: white;
    font-weight: 500;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.form-footer {
    font-size: 0.75rem;
    text-align: center;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

/* Full-screen loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(6px);
    z-index: 1000;
}

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

.loading-text {
    color: hsl(var(--foreground));
    font-weight: 500;
}

.features-section {
    position: relative;
    padding: 5rem 0;
    border-top: 1px solid hsl(var(--border));
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: hsl(var(--muted-foreground));
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    backdrop-filter: blur(10px);
    background: hsl(var(--background) / 0.8);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid hsl(var(--border));
    transition: var(--transition-smooth);
}

.feature-card:hover {
    border-color: hsl(var(--primary) / 0.5);
    transform: translateY(-4px);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.feature-icon.primary {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

.feature-icon.accent {
    background: hsl(var(--accent) / 0.1);
    color: hsl(var(--accent));
}

.feature-icon.glow {
    background: hsl(var(--primary-glow) / 0.1);
    color: hsl(var(--primary-glow));
}

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

.feature-card p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

/* Temporary highlight for form focus */
.form-card.highlight {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15), var(--card-shadow);
    animation: cardPulse 1.4s ease-out 1;
}

@keyframes cardPulse {
    0% { box-shadow: 0 0 0 0 hsl(var(--primary) / 0.25), var(--card-shadow); }
    60% { box-shadow: 0 0 0 8px hsl(var(--primary) / 0.0), var(--card-shadow); }
    100% { box-shadow: 0 0 0 0 hsl(var(--primary) / 0.0), var(--card-shadow); }
}

/* Examples Section */
.examples-section {
    position: relative;
    padding: 5rem 0;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
}

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

@media (min-width: 768px) {
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.example-card {
    backdrop-filter: blur(10px);
    background: hsl(var(--background) / 0.8);
    border-radius: 1rem;
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    transition: var(--transition-smooth);
}

.example-card:hover {
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: var(--card-shadow);
    transform: translateY(-4px);
}

.example-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--accent) / 0.05));
    overflow: hidden;
    border-bottom: 1px solid hsl(var(--border));
}

.example-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: var(--transition-smooth);
}

.example-card:hover .example-screenshot {
    transform: scale(1.05);
}

.example-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.preview-content {
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.preview-content.cyan {
    background: #050505;
}

.preview-content.purple {
    background: linear-gradient(135deg, #1a0a2e 0%, #0a0a0f 100%);
}

.preview-content.glass {
    background: #0b1020;
    position: relative;
}

.example-card:hover .preview-content {
    transform: scale(1.02);
}

.preview-header {
    display: flex;
    gap: 0.4rem;
    padding: 0.8rem;
    background: rgba(20, 20, 20, 0.8);
    border-bottom: 1px solid rgba(100, 100, 100, 0.2);
}

.preview-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: rgba(150, 150, 150, 0.5);
}

.preview-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.preview-content.cyan .preview-body {
    flex-direction: row;
    padding: 0;
}

.preview-nav {
    height: 2rem;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
    border-radius: 0.3rem;
}

.preview-sidenav {
    width: 3rem;
    background: rgba(20, 20, 20, 0.6);
    border-right: 1px solid rgba(100, 100, 100, 0.2);
    flex-shrink: 0;
}

.preview-main {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.preview-hero {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.preview-text {
    height: 1rem;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.4), rgba(139, 92, 246, 0.2));
    border-radius: 0.2rem;
    animation: shimmer 2s infinite;
}

.preview-text.short {
    width: 60%;
    opacity: 0.6;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

.preview-content.cyan .preview-section {
    grid-template-columns: repeat(2, 1fr);
}

.preview-box {
    height: 2.5rem;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 0.3rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.preview-box.small {
    height: 3rem;
}

.preview-hero.large {
    margin-bottom: 0.8rem;
}

.preview-hero.centered {
    text-align: center;
    align-items: center;
}

.preview-section.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.preview-blobs {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.blob-preview {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: blobFloat 8s ease-in-out infinite;
}

.blob-preview:first-child {
    background: radial-gradient(circle, #7c3aed, transparent);
    top: 10%;
    left: 10%;
}

.blob-preview:last-child {
    background: radial-gradient(circle, #06b6d4, transparent);
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -10px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.95); }
}

.example-info {
    padding: 1.5rem;
}

.example-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.example-info p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.examples-footer {
    text-align: center;
    padding: 2rem;
    background: hsl(var(--background) / 0.8);
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border));
}

.examples-footer p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}