@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
    --bg-color: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
    --accent: #dc2626;
    --accent-hover: #b91c1c;
    --accent-glow: rgba(220, 38, 38, 0.15);
    --secondary: #ef4444;
    --card-bg: #f9fafb;
    --glass-border: rgba(0, 0, 0, 0.1);
    --font-family: "Inter", sans-serif;
    --radius: 12px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Gradients */
body::before {
    content: "";
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(
        circle,
        rgba(239, 68, 68, 0.10) 0%,
        transparent 60%
    );
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Navbar container */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent);
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

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

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dropdown-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0.5rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--card-bg);
    color: var(--text-main);
}

.dropdown-item i,
.dropdown-item svg {
    color: var(--accent);
    font-size: 1.1rem;
    width: 18px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        var(--secondary) 100%
    );
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--card-bg);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 60px;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #111827, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    max-width: 900px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Mockup Display */
.hero-mockup {
    margin-top: 40px;
    width: 100%;
    max-width: 900px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out 0.8s both;
}

.mockup-header {
    height: 48px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red {
    background: #ff5f56;
}
.dot.yellow {
    background: #ffbd2e;
}
.dot.green {
    background: #27c93f;
}

.mockup-body {
    padding: 24px;
    font-family: "Fira Code", monospace; /* code font fallback */
    font-size: 0.9rem;
    color: #4b5563;
    text-align: left;
    overflow-x: auto;
    white-space: pre-wrap;
}
.mockup-body div {
    white-space: pre-wrap;
}
.mockup-body .key {
    color: #f472b6;
}
.mockup-body .string {
    color: #34d399;
}
.mockup-body .boolean {
    color: #60a5fa;
}

/* Features Grid */
.section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.3s ease;
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.3);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

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

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 60px 4% 40px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-main);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* API Detail Page Structure */
.api-hero {
    padding: 160px 4% 80px;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.api-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, #111827, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.api-code-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.api-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.api-code-preview {
    background: rgba(249, 250, 251, 1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.api-code-preview pre {
    margin: 0;
    white-space: pre-wrap;
}

.endpoint-info {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    margin-bottom: 24px;
    font-family: monospace;
}

.method {
    color: #34d399;
    font-weight: 700;
}

/* Response Section */
.response-section {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 5%;
}

.response-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.response-header {
    background: rgba(0, 0, 0, 0.02);
    padding: 16px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.response-body {
    padding: 24px;
}

.response-body pre {
    color: #4b5563;
    font-family: monospace;
    font-size: 0.95rem;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 900px) {
    .api-hero {
        grid-template-columns: 1fr;
        padding-top: 120px;
        text-align: center;
    }
    .endpoint-info {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        gap: 1.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding-left: 15px;
        margin-top: 10px;
        display: block;
        min-width: unset;
        width: 100%;
    }

    .dropdown-toggle svg {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .api-hero {
        padding: 100px 5% 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
        width: 100%;
        max-width: 100%;
    }

    .api-content {
        width: 100%;
        max-width: 100%;
    }

    .api-code-section {
        width: 100%;
        max-width: 100%;
    }

    .api-content h1 {
        font-size: 2rem;
        word-wrap: break-word;
    }

    .api-content p {
        font-size: 1rem;
    }

    .endpoint-info {
        display: flex;
        justify-content: center;
        width: auto;
        margin: 0 auto 20px;
        font-size: 0.85rem;
    }

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

    .api-hero div[style*="display: flex; gap: 15px;"] {
        flex-direction: column;
        width: 100%;
    }

    .api-content ul {
        text-align: left;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .tab-content {
        padding: 15px;
    }

    .tab-panel pre {
        font-size: 0.8rem;
    }

    .response-preview {
        margin-top: 15px;
    }

    .api-details-seo h2, 
    .api-faq-section h2 {
        font-size: 1.6rem !important;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .footer-links a {
        display: block;
    }

    .footer-content .logo {
        margin-bottom: 20px;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0px 6px 20px rgba(37, 211, 102, 0.6);
    color: #FFF;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

/* Code Tabs Styles */
.code-tabs {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(220, 38, 38, 0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.02);
}

.tab-content {
    padding: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel pre {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
