/* =========================================
   API Landing Page CSS
   getvidfb.com
   ========================================= */

/* ---------- Root Variables ---------- */
:root {
    --api-primary: #4ea2e3;
    --api-primary-dark: #2563eb;
    --api-dark: #0f0c29;
    --api-dark-mid: #1a1744;
    --api-dark-light: #24243e;
    --api-text: #e2e8f0;
    --api-text-muted: rgba(255, 255, 255, 0.55);
    --api-border: rgba(255, 255, 255, 0.1);
    --api-glass: rgba(255, 255, 255, 0.05);
    --api-glass-border: rgba(255, 255, 255, 0.12);
}

/* ---------- Base ---------- */
.api-page {
    background: var(--api-dark);
    color: var(--api-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

.api-page * {
    box-sizing: border-box;
}

.api-page a {
    color: var(--api-primary);
}

.api-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Navbar Override ---------- */
.api-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--api-border);
}

.api-navbar .nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.api-navbar .nav-logo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.api-navbar .nav-logo span {
    color: var(--api-primary);
}

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

.api-navbar .nav-links a {
    color: var(--api-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.api-navbar .nav-links a:hover {
    color: #fff;
}

.api-navbar .nav-cta {
    padding: 8px 20px;
    background: linear-gradient(135deg, #4ea2e3 0%, #2563eb 100%);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: transform 0.2s, box-shadow 0.3s;
}

.api-navbar .nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(78, 162, 227, 0.35);
}

/* ---------- Hero Section ---------- */
.api-hero {
    padding: 10rem 1.25rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 40%, #24243e 100%);
}

.api-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(78, 162, 227, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
    animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-5%, 5%); }
}

.api-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.api-hero .badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(78, 162, 227, 0.15);
    border: 1px solid rgba(78, 162, 227, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #93c5fd;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.api-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.api-hero h1 .gradient-text {
    background: linear-gradient(135deg, #4ea2e3 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.api-hero .hero-desc {
    font-size: 1.15rem;
    color: var(--api-text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.api-hero .hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-lg {
    padding: 14px 32px;
    background: linear-gradient(135deg, #4ea2e3 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(78, 162, 227, 0.35);
    color: #fff;
}

.btn-ghost-lg {
    padding: 14px 32px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ghost-lg:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ---------- Stats Bar ---------- */
.api-stats {
    padding: 2.5rem 1.25rem;
    background: var(--api-dark-mid);
    border-top: 1px solid var(--api-border);
    border-bottom: 1px solid var(--api-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    display: block;
}

.stat-item .stat-label {
    font-size: 13px;
    color: var(--api-text-muted);
    margin-top: 4px;
}

/* ---------- Features Section ---------- */
.api-features {
    padding: 5rem 1.25rem;
    background: var(--api-dark);
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 3rem;
}

.section-header .section-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(78, 162, 227, 0.12);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-header p {
    color: var(--api-text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    background: var(--api-glass);
    border: 1px solid var(--api-glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(78, 162, 227, 0.3);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.feature-card .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 1rem;
}

.feature-icon.blue   { background: rgba(78, 162, 227, 0.15); }
.feature-icon.purple { background: rgba(168, 85, 247, 0.15); }
.feature-icon.green  { background: rgba(34, 197, 94, 0.15); }
.feature-icon.orange { background: rgba(249, 115, 22, 0.15); }
.feature-icon.pink   { background: rgba(236, 72, 153, 0.15); }
.feature-icon.cyan   { background: rgba(6, 182, 212, 0.15); }

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 14px;
    color: var(--api-text-muted);
    line-height: 1.6;
}

/* ---------- How It Works ---------- */
.api-steps {
    padding: 5rem 1.25rem;
    background: var(--api-dark-mid);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4ea2e3 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 1.25rem;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.step-card p {
    font-size: 14px;
    color: var(--api-text-muted);
    line-height: 1.6;
}

/* ---------- Code Demo Section ---------- */
.api-demo {
    padding: 5rem 1.25rem;
    background: var(--api-dark);
}

.demo-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.demo-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--api-border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    color: var(--api-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.demo-tab.active {
    background: #1e1b3a;
    color: #fff;
    border-color: rgba(78, 162, 227, 0.3);
}

.demo-code {
    display: none;
    background: #1e1b3a;
    border: 1px solid rgba(78, 162, 227, 0.15);
    border-radius: 0 12px 12px 12px;
    padding: 1.5rem;
    position: relative;
    overflow: auto;
}

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

.demo-code pre {
    margin: 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13.5px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre;
    overflow-x: auto;
}

.demo-code .btn-copy-code {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--api-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.demo-code .btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Code syntax colors */
.code-keyword { color: #c084fc; }
.code-string  { color: #86efac; }
.code-comment { color: #64748b; }
.code-func    { color: #93c5fd; }
.code-var     { color: #fbbf24; }

/* ---------- Pricing Section ---------- */
.api-pricing {
    padding: 5rem 1.25rem;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.pricing-card {
    background: var(--api-glass);
    border: 1px solid var(--api-glass-border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
    border-color: rgba(78, 162, 227, 0.4);
    background: rgba(78, 162, 227, 0.08);
}

.pricing-card.popular::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: linear-gradient(135deg, #4ea2e3 0%, #2563eb 100%);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pricing-card .plan-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--api-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.pricing-card .plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}

.pricing-card .plan-price .currency {
    font-size: 1.2rem;
    vertical-align: super;
    margin-right: 2px;
    font-weight: 600;
}

.pricing-card .plan-price .period {
    font-size: 0.85rem;
    color: var(--api-text-muted);
    font-weight: 400;
}

.pricing-card .plan-desc {
    font-size: 13px;
    color: var(--api-text-muted);
    margin-bottom: 1.5rem;
}

.pricing-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
    flex-grow: 1;
}

.pricing-card .plan-features li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--api-text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.pricing-card .plan-features li::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-card .btn-plan {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    text-align: center;
    border: none;
    font-family: inherit;
}

.pricing-card .btn-plan.primary {
    background: linear-gradient(135deg, #4ea2e3 0%, #2563eb 100%);
    color: #fff;
}

.pricing-card .btn-plan.primary:hover {
    box-shadow: 0 6px 20px rgba(78, 162, 227, 0.35);
    transform: translateY(-1px);
}

.pricing-card .btn-plan.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pricing-card .btn-plan.outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
}

/* ---------- FAQ Section ---------- */
.api-faq {
    padding: 5rem 1.25rem;
    background: var(--api-dark);
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--api-border);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: rgba(78, 162, 227, 0.25);
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    font-family: inherit;
}

.faq-question .faq-arrow {
    font-size: 18px;
    transition: transform 0.3s;
    flex-shrink: 0;
    color: var(--api-text-muted);
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 1.25rem 1rem;
    font-size: 14px;
    color: var(--api-text-muted);
    line-height: 1.7;
}

/* ---------- CTA Section ---------- */
.api-cta {
    padding: 5rem 1.25rem;
    background: linear-gradient(135deg, #1a1744 0%, #302b63 100%);
    text-align: center;
}

.api-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.api-cta p {
    color: var(--api-text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Footer ---------- */
.api-footer {
    padding: 2rem 1.25rem;
    background: var(--api-dark);
    border-top: 1px solid var(--api-border);
    text-align: center;
}

.api-footer p {
    color: var(--api-text-muted);
    font-size: 13px;
}

.api-footer a {
    color: var(--api-primary);
    text-decoration: none;
}

/* ---------- API Docs ---------- */
.api-docs-section {
    padding: 6rem 1.25rem 3rem;
    background: var(--api-dark);
    min-height: 100vh;
}

.docs-container {
    max-width: 800px;
    margin: 0 auto;
}

.docs-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.docs-container .docs-subtitle {
    color: var(--api-text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.docs-container h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--api-border);
}

.docs-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.docs-container p, .docs-container li {
    color: var(--api-text);
    font-size: 15px;
    line-height: 1.7;
}

.docs-container ul {
    list-style: none;
    padding-left: 0;
}

.docs-container ul li {
    padding: 4px 0;
    margin-bottom: 4px;
}

.docs-container ul li::before {
    content: '•';
    color: var(--api-primary);
    font-weight: bold;
    margin-right: 8px;
}

.endpoint-block {
    background: #1e1b3a;
    border: 1px solid rgba(78, 162, 227, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.endpoint-method {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
    margin-right: 8px;
}

.endpoint-method.post {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.endpoint-url {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    color: #fff;
}

.docs-code {
    background: #1e1b3a;
    border: 1px solid rgba(78, 162, 227, 0.1);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    overflow-x: auto;
}

.docs-code pre {
    margin: 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: #e2e8f0;
    white-space: pre;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.param-table th,
.param-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--api-border);
    font-size: 14px;
}

.param-table th {
    color: var(--api-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-table td {
    color: var(--api-text);
}

.param-table code {
    background: rgba(78, 162, 227, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #93c5fd;
}

.required-badge {
    font-size: 11px;
    color: #f87171;
    font-weight: 600;
}

.optional-badge {
    font-size: 11px;
    color: #64748b;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .api-hero h1 {
        font-size: 2.2rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
    .api-navbar .nav-links {
        gap: 12px;
    }
    .api-navbar .nav-links a:not(.nav-cta) {
        display: none;
    }
}

@media (max-width: 480px) {
    .api-hero h1 {
        font-size: 1.75rem;
    }
    .api-hero .hero-desc {
        font-size: 1rem;
    }
    .section-header h2 {
        font-size: 1.6rem;
    }
    .api-cta h2 {
        font-size: 1.5rem;
    }
    .btn-primary-lg, .btn-ghost-lg {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
}
