/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-light: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --glow-color: rgba(99, 102, 241, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-gradient-light: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: #1e293b;
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --glow-color: rgba(99, 102, 241, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(var(--bg-primary-rgb, 255, 255, 255), 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.logo-link:hover {
    transform: scale(1.05);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    position: relative;
}

.language-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.language-select:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: var(--bg-gradient-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    margin-bottom: 4rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hero-illustration {
    position: relative;
    height: 300px;
    margin-top: 2rem;
}

.ai-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 50%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: 10%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* How It Works Section - Clear Sequential Workflow */
.how-it-works {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.workflow-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.workflow-step {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 220px;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.workflow-step:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px var(--glow-color);
    background: var(--bg-secondary);
}

.workflow-step.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px var(--glow-color);
    background: var(--bg-secondary);
}

.step-icon-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.step-icon {
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.workflow-step:hover .step-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 12px var(--glow-color));
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--bg-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: absolute;
    top: -10px;
    right: -10px;
    border: 3px solid var(--card-bg);
}

.workflow-step:hover .step-number {
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--glow-color);
}

.step-content {
    text-align: center;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.workflow-arrow {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 300;
    opacity: 0.6;
    transition: var(--transition);
    animation: pulse-arrow 2s ease-in-out infinite;
    flex-shrink: 0;
    margin: 0 0.5rem;
}

@keyframes pulse-arrow {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}

.workflow-step:hover + .workflow-arrow,
.workflow-step.active + .workflow-arrow {
    opacity: 1;
    animation: none;
    transform: translateX(8px);
}

/* Mobile Workflow */
@media (max-width: 1024px) {
    .workflow-steps {
        flex-direction: column;
        align-items: center;
    }

    .workflow-step {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .workflow-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }

    .workflow-step:hover + .workflow-arrow,
    .workflow-step.active + .workflow-arrow {
        transform: rotate(90deg) translateY(8px);
    }
}

@media (max-width: 768px) {
    .workflow-step {
        min-width: 100%;
        padding: 1.5rem 1rem;
    }

    .step-icon {
        font-size: 3rem;
    }

    .step-title {
        font-size: 1.05rem;
    }

    .step-description {
        font-size: 0.85rem;
    }
}

/* Features Section */
.features {
    background: var(--bg-secondary);
}

.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: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--card-border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Documentation Section */
.documentation {
    background: var(--bg-primary);
}

.documentation-content {
    max-width: 800px;
    margin: 0 auto;
}

.doc-section {
    margin-bottom: 3rem;
}

.doc-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.doc-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.faq-section {
    margin-top: 4rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Support Section */
.support {
    background: var(--bg-secondary);
}

.support-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.support-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.support-email {
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.email-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.email-link:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--glow-color);
}

.form-group textarea {
    resize: vertical;
}

/* Privacy Policy & Terms Sections */
.privacy-policy,
.terms-of-use {
    background: var(--bg-primary);
}

.policy-content,
.terms-content {
    max-width: 800px;
    margin: 0 auto;
}

.policy-text,
.terms-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.policy-subtitle,
.terms-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.policy-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.policy-link:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
}

[data-theme="dark"] .footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .footer-copyright {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

[data-theme="dark"] .footer-link {
    color: var(--text-secondary);
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

[data-theme="dark"] .footer-link:hover {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .header-controls {
        order: -1;
    }

    .hero {
        padding: 4rem 0;
    }

    section {
        padding: 3rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Page Content Styles */
.page-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 800px;
}
