/* CSS Variables */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #00C896;
    --text: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --background: #FFFFFF;
    --background-light: #F8F9FA;
    --border: #E5E7EB;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font-family);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #5a3a7a;
    transform: translateY(-2px);
}

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

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

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--background-light);
    color: var(--primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 10px var(--shadow);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.05;
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.card-header {
    background: var(--gradient-primary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-dots {
    display: flex;
    gap: 6px;
}

.card-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.card-title {
    color: white;
    font-weight: 600;
}

.card-content {
    padding: 24px;
    background: #1e1e1e;
}

.code-preview {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-line {
    margin-bottom: 8px;
    color: #d4d4d4;
}

.code-keyword {
    color: #569cd6;
}

.code-path {
    color: #ce9178;
}

.code-property {
    color: #9cdcfe;
}

.code-value {
    color: #b5cea8;
}

.code-string {
    color: #ce9178;
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-light);
}

/* Features Section */
.features {
    background: var(--background-light);
}

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

.feature-card {
    background: white;
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 24px;
    margin-bottom: 12px;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* How It Works Section */
.steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
}

.step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-top: 12px;
}

.step-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-light);
    font-size: 18px;
}

/* Code Examples Section */
.code-examples {
    background: var(--background-light);
}

.code-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.code-tab {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font-family);
}

.code-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.code-container {
    max-width: 900px;
    margin: 0 auto;
}

.code-block {
    display: none;
    background: #1e1e1e;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-lg);
}

.code-block.active {
    display: block;
}

.code-block pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* API Documentation Section */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.doc-card {
    background: white;
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
}

.doc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
}

.doc-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 24px;
}

.doc-title {
    font-size: 24px;
    margin-bottom: 12px;
}

.doc-description {
    color: var(--text-light);
    margin-bottom: 20px;
}

.doc-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.doc-link:hover {
    gap: 12px;
}

.endpoints-preview {
    background: white;
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow);
}

.endpoints-title {
    font-size: 24px;
    margin-bottom: 24px;
}

.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
}

.endpoint-method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.endpoint-method.post {
    background: #10b981;
    color: white;
}

.endpoint-method.get {
    background: #3b82f6;
    color: white;
}

.endpoint-path {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.endpoint-desc {
    color: var(--text-light);
}

/* CTA Section */
.cta {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 42px;
    margin-bottom: 16px;
    color: white;
}

.cta-subtitle {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

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

.cta .btn-primary:hover {
    background: var(--background-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 24px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group .optional {
    color: var(--text-lighter);
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-family: var(--font-family);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-result {
    padding: 24px;
    display: none;
}

.modal-result.active {
    display: block;
}

.modal-result.success {
    background: #d1fae5;
    color: #065f46;
    border-radius: var(--border-radius-sm);
}

.modal-result.error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: var(--border-radius-sm);
}

.api-key-display {
    padding: 24px;
}

.api-key-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fef3c7;
    color: #92400e;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.api-key-value {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    font-family: 'Monaco', 'Menlo', monospace;
}

.api-key-value code {
    flex: 1;
    font-size: 14px;
    word-break: break-all;
    color: var(--text);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 42px;
    }

    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 20px var(--shadow);
        display: none;
        gap: 16px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

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

    .hero-cta .btn {
        width: 100%;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 18px;
    }

    section {
        padding: 60px 0;
    }

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

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

    .endpoint-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .endpoint-path {
        width: 100%;
        word-break: break-all;
    }

    .steps {
        gap: 24px;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }

    .cta-title {
        font-size: 28px;
    }

    .cta-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .modal-content {
        margin: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

