﻿/* Global Styles */
@import 'newsletter.css';

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --danger-color: #ef4444;
    --bg-card: #f8fafc;
}

/* Fix Dropdown Overlap */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 10001;
    /* Ensure it floats above everything */
    left: auto;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    padding: 0.25rem 0;

}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.15s ease;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

body.dark-mode {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    /* Brighter white for main text */
    --text-muted: #cbd5e1;
    /* Lighter gray for muted text */
    --border-color: #334155;
    --primary-color: #818cf8;
    /* Lighter indigo for better contrast on dark */
    --accent-color: #22d3ee;
    --bg-card: #1e293b;
}

body.dark-mode {
    background: #0f172a !important;
    /* Override gradient */
    color: var(--text-main);
}

body.dark-mode .card,
body.dark-mode .api-card,
body.dark-mode .header,
body.dark-mode .nav-links {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: none;
}

body.dark-mode .settings-tab:hover {
    background: #334155;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

body.dark-mode .btn-outline:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

body.dark-mode table {
    color: var(--text-main);
}

body.dark-mode th {
    color: var(--text-main);
}

body.dark-mode td {
    border-color: var(--border-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background: linear-gradient(-45deg, #f8fafc, #e2e8f0, #f1f5f9, #f8fafc);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
}

/* Background Shades for Logged In Panel */
body.logged-in {
    background-color: #ffffff;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(200, 245, 255, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 60%, rgba(255, 250, 210, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(240, 248, 255, 0.3) 0%, transparent 30%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

body.dark-mode.logged-in {
    background-color: #0f172a;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(15, 80, 100, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 90% 60%, rgba(80, 70, 20, 0.2) 0%, transparent 50%);
}


@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Specific background for login/register modals to pop */
.modal-overlay {
    backdrop-filter: blur(8px);
    background: rgba(15, 23, 42, 0.4);
}

/* Header & Nav */
.header {
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1100;
}

.page-header {
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Buttons */
/* Buttons */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

/* Responsive Nav Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        animation: slideDown 0.3s ease forwards;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 0.8rem;
        width: 100%;
        text-align: center;
        border-radius: 8px;
    }

    .nav-links a:hover {
        background: var(--bg-color);
    }

    .desktop-auth-btns {
        display: none !important;
    }

    #mobileLoginBtn,
    #mobileRegBtn {
        display: inline-flex !important;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-main);
    background: white;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8fafc;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero .btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero .btn-white {
    background: white;
    color: var(--primary-color);
}

.hero .btn-trans {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(5px);
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Moving Character Animation */
.floating-char {
    position: absolute;
    top: 20%;
    left: -100px;
    font-size: 4rem;
    animation: moveChar 15s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

@keyframes moveChar {
    0% {
        left: -100px;
        transform: rotate(0deg) translateY(0);
    }

    25% {
        transform: rotate(10deg) translateY(-20px);
    }

    50% {
        transform: rotate(0deg) translateY(0);
    }

    75% {
        transform: rotate(-10deg) translateY(20px);
    }

    100% {
        left: 110%;
        transform: rotate(0deg) translateY(0);
    }
}

/* Main Layout Structure */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    /* Increased max-width for more breathing room */
    margin: 0 auto;
    padding: 2rem 4rem;
    /* Increased horizontal padding */
    flex: 1;
    /* Ensures container pushes footer down */
}

/* API Details Grid Fix */
.api-details-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
    /* Changed from stretch to start to avoid weird height stretching if content differs greatly */
}

/* Prevent Grid Blowout from Code Blocks */
.api-details-grid>div {
    min-width: 0;
}

/* Footer Animation */
.animated-footer {
    background: linear-gradient(270deg, #1e293b, #3b82f6, #0f172a, #8b5cf6);
    /* Brighter colors: Slate, Blue, Slate, Violet */
    background-size: 400% 400%;
    animation: gradientFooter 10s ease infinite;
    /* Faster animation */
    color: white;
    margin-top: auto;
    /* Pushes to bottom if flex container */
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes gradientFooter {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }

    .api-details-grid {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .api-card img {
        height: 160px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* API Grid */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h3 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.api-grid {
    display: grid;
    /* Force max 3 columns by setting min-width ~1/3 of typical container or using auto-fit with max-width */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Ensure max 3 on large screens explicitly if needed */
@media (min-width: 1200px) {
    .api-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.api-card {
    background: rgba(255, 255, 255, 0.65);
    /* Deeper glass (0.65) */
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Clearer border */
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    /* Deep blur */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    /* Deep shadow */
    position: relative;
    cursor: pointer;
    text-decoration: none;
    z-index: 1;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.api-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    /* Stronger hover shadow */
    background: rgba(255, 255, 255, 0.85);
    /* Keep some glass */
    border-color: var(--primary-color);
}

.api-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.api-card .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.api-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.api-price {
    font-weight: 700;
    color: var(--primary-color);
}

.api-method {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
}

.method-GET {
    background: #dcfce7;
    color: #166534;
}

.method-POST {
    background: #dbeafe;
    color: #1e40af;
}

.method-PUT {
    background: #ffedd5;
    color: #9a3412;
}

.method-DELETE {
    background: #fee2e2;
    color: #991b1b;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    /* Increased from 500px for better desktop experience */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

/* Responsive Nav Styles */
@media (max-width: 768px) {
    .nav {
        flex-wrap: wrap;
        /* Allow wrapping */
        padding: 0.5rem 0;
    }

    .mobile-menu-toggle {
        display: flex !important;
        /* Force display */
        z-index: 1000;
        margin-left: auto;
        /* Push to right */
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 1.5rem;
        background: var(--card-bg);
        /* Use var for dark mode support */
        position: absolute;
        top: 100%;
        /* Push below header */
        left: 0;
        right: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
        /* Ensure strictly above content */
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a,
    .nav-links button.btn-text {
        padding: 1rem;
        text-align: left;
        /* Align left as requested/standard */
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        display: block;
        color: var(--text-main);
    }

    /* Fix Dropdowns on Mobile */
    .dropdown-menu-container {
        width: 100%;
        display: block !important;
    }

    .dropdown-menu-container button.btn-text {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
    }

    .dropdown-content {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        padding-left: 1.5rem !important;
        background: rgba(0, 0, 0, 0.02);
        display: none;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        width: 100%;
    }

    .dropdown-content.show {
        display: block !important;
    }


    .nav-links form {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .nav h1 {
        font-size: 1.2rem;
    }

    /* Footer Mobile Alignment */
    .footer-content {
        flex-direction: column;
        align-items: center;
        /* Center align items */
        text-align: center;
        /* Center text */
        gap: 2rem;
    }

    .footer-section {
        width: 100%;
        text-align: center;
    }

    .footer-section h4 {
        margin-bottom: 1rem;
    }

    .footer-section ul li {
        margin-bottom: 0.8rem;
    }

    .footer-brand {
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Footer Content - Professional Columns */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    padding-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 2;
    min-width: 250px;
}

.footer-section {
    flex: 1;
    min-width: 160px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .container {
        padding: 0 1rem;
    }

    .footer-content {
        gap: 2rem;
    }

    .footer-brand {
        flex: 1 1 100%;
        text-align: center;
    }

    .footer-section {
        flex: 1 1 45%;
        /* Two columns on mobile */
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    color: var(--text-main);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s ease;
}

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.table-responsive table {
    margin-bottom: 0;
    border: none;
}


.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(5px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Code Editor Textarea */
textarea.json-editor {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace !important;
    font-size: 0.9rem;
    background: #1e293b !important;
    color: #a5f3fc;
    border-color: #334155;
}

textarea.json-editor::placeholder {
    color: #64748b;
}

textarea.json-editor:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.form-group input:focus+label {
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.tab.active {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
    font-weight: 600;
}

.tab-content {
    display: none !important;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Specifics */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: var(--bg-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.api-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .container {
        padding: 0 1rem;
    }

    .api-details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .api-card img {
        height: 160px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}


.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* -------------------------------------------------------------------------- */
/*                               Modern Navigation                             */
/* -------------------------------------------------------------------------- */

/* Header Refinement */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: none;
    /* Clean flat look, let border do the work */
    padding: 1rem 2rem;
}

body.dark-mode .header {
    background: rgba(30, 41, 59, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Navigation Access Control */
.desktop-auth-btns {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .desktop-auth-btns {
        display: none;
    }

    #mobileLoginBtn,
    #mobileRegBtn {
        display: block !important;
        margin-bottom: 0.5rem;
    }
}

/* Nav Links */
.nav-links {
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Dropdown Menus - Premium Style */
.dropdown-menu-container {
    position: relative;
}

.btn-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.btn-text:hover {
    color: var(--primary-color) !important;
}

.dropdown-content {
    display: block;
    /* Always block for animation state */
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    min-width: 200px;
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 99999;
    /* Boost z-index significantly */
    border: 1px solid var(--border-color);
    white-space: nowrap;
    /* Prevent text wrapping */
}

/* Fix for hover gap - invisible bridge */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    /* Extend upwards to overlap with button */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

body.dark-mode .dropdown-content {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    background: #1e293b;
    border: 1px solid #334155;
}

/* Hover triggering (CSS-only fallback + JS class) */
.dropdown-menu-container:hover .dropdown-content,
.dropdown-content.show {
    visibility: visible;
    opacity: 1;
    top: 100%;
    /* Slide up effect */
    transform: translateX(-50%) translateY(10px);
    /* Keep X center */
}

/* Adjust transform for active state to be clean */
.dropdown-menu-container:hover .dropdown-content,
.dropdown-content.show {
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 2px;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-content a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: translateX(4px);
    /* Subtle nudge */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0 0 0 1rem;
        transform: none;
        visibility: visible;
        opacity: 1;
        display: none;
        /* Use display for mobile toggle */
        border: none;
    }

    .dropdown-content.show {
        display: block;
        transform: none;
    }

    .dropdown-menu-container {
        width: 100%;
        text-align: center;
    }

    .btn-text {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        gap: 0.5rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                        Toolbox AI Inspired Design                          */
/* -------------------------------------------------------------------------- */

/* AWESOME HERO - Mesh Gradient Animation */
.awesome-hero {
    position: relative;
    padding: 8rem 2rem 10rem;
    /* Extra padding bottom for sponsored strip overlap */
    background: #0f172a;
    /* Fallback */
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-bg-animation {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.4), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.4), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.4), transparent 40%);
    filter: blur(80px);
    /* The Awesome Blur Effect */
    animation: moveMesh 20s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes moveMesh {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(10deg) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.awesome-hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.awesome-hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* HERO SEARCH BAR - Prominent Design */
.hero-search-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-search-form {
    display: flex;
    gap: 10px;
    background: white;
    padding: 0.5rem;
    padding-left: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-icon {
    font-size: 1.2rem;
    opacity: 0.5;
}

.hero-search-form input {
    width: 100%;
    border: none;
    font-size: 1.1rem;
    padding: 0.8rem 0;
    outline: none;
    background: transparent;
    color: #1e293b;
}

.btn-search {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.popular-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #94a3b8;
    align-items: center;
}

.popular-tags a {
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
    transition: color 0.2s;
}

.popular-tags a:hover {
    color: white;
    border-bottom-color: white;
}

/* SPONSORED STRIP - Toolbox AI Vibe */
.sponsored-strip {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.sponsored-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
    border-right: 1px solid var(--border-color);
    padding-right: 1.5rem;
    margin-right: 1rem;
    white-space: nowrap;
}

.sponsored-logos {
    flex: 1;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    align-items: center;
    /* Hide Scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sponsored-logos::-webkit-scrollbar {
    display: none;
}

.sponsor-item {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sponsor-item:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .awesome-hero {
        padding: 6rem 1rem 8rem;
    }

    .awesome-hero h2 {
        font-size: 2.5rem;
    }

    .hero-search-form {
        flex-direction: column;
        padding: 0.5rem;
    }

    .search-input-wrapper {
        padding: 0.5rem;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 0.5rem;
    }

    .sponsored-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .sponsored-label {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        padding-bottom: 0.5rem;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* SPONSORED STRIP STYLING (Premium Override) */
.sponsored-strip {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        inset 0 0 20px rgba(59, 130, 246, 0.05);
    /* Subtle inner blue glow */
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    gap: 1.5rem;
    animation: strip-float 6s ease-in-out infinite;
}

/* Animated gradient border effect */
.sponsored-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    background-size: 200% 100%;
    animation: border-shimmer 3s linear infinite;
}

.sponsored-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    /* Reset margins that might be set elsewhere */
    margin: 0;
}

.sponsored-logos {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    overflow: hidden;
}

.sponsor-item {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, color 0.2s, text-shadow 0.2s;
    font-size: 0.95rem;
    opacity: 1;
    /* Override opacity from earlier */
}

.sponsor-item:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Animations */
@keyframes strip-float {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }

    50% {
        transform: translateY(-3px);
        box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.08);
    }
}

@keyframes border-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Dark mode adjustments */
body.dark-mode .sponsored-strip {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body.dark-mode .sponsored-label {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* FAQ SECTION STYLES */
.faq-section {
    background: #f8fafc;
}

.faq-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.6;
    animation: floatBlob 10s infinite alternate;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.2);
    top: -50px;
    left: -50px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.15);
    bottom: -100px;
    right: -100px;
    animation-duration: 15s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: rgba(16, 185, 129, 0.15);
    top: 30%;
    right: 20%;
    animation-duration: 12s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

.faq-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.9);
}

.faq-item.active {
    border-color: var(--primary-color);
    background: white;
}

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    max-height: 150px;
    margin-top: 1rem;
}

/* Dark Mode FAQ */
body.dark-mode .faq-section {
    background: #0f172a;
}

body.dark-mode .text-center h3 {
    color: #f1f5f9 !important;
}

body.dark-mode .text-center p {
    color: #94a3b8 !important;
}

body.dark-mode .faq-item {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .faq-item:hover {
    background: rgba(30, 41, 59, 0.9);
}

body.dark-mode .faq-item.active {
    background: #1e293b;
    border-color: var(--primary-color);
}

/* --- SPONSORED STRIP (PREMIUM FIX) --- */
.sponsored-wrapper-animated {
    width: 100%;
    /* Subtle modern gradient background */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    pointer-events: none;
    /* Ensure clicks pass through if needed, or remove if interactive */
}

/* Mesh pattern overlay */
.sponsored-wrapper-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    pointer-events: none;
}

.sponsored-strip {
    display: flex;
    align-items: center;
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 99px;
    /* Pill shape */
    padding: 0.5rem 0.75rem;
    /* Compact padding */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 2px 4px -1px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    max-width: fit-content;
    margin: 0 auto;
    position: relative;
    gap: 1.5rem;
    pointer-events: auto;
    /* Re-enable pointer events for content */
    animation: strip-float 6s ease-in-out infinite;
}

.sponsored-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    /* Muted text for elegance */
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.sponsored-logos {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sponsor-item {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.sponsor-item:hover {
    opacity: 1;
    transform: translateY(-1px);
    color: var(--primary-color);
}

.sponsor-item img {
    height: 20px;
    width: auto;
    margin-right: 8px;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.sponsor-item:hover img {
    filter: grayscale(0%);
}

/* Dark Mode Overrides */
body.dark-mode .sponsored-wrapper-animated {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sponsored-wrapper-animated::before {
    background-image:
        radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}

body.dark-mode .sponsored-strip {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

body.dark-mode .sponsored-label {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode .sponsor-item {
    color: #cbd5e1;
}

body.dark-mode .sponsor-item:hover {
    color: #60a5fa;
}

@keyframes strip-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Higher Z-Index for Dropdowns */
.dropdown-content {
    z-index: 9999 !important;
}


/* Table Card Fix */
.card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.table-responsive {
    background: #fff;
    border-radius: 8px;
}

/* Directory Layout Responsive */
.directory-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.directory-sidebar {
    background: var(--bg-glass);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

@media (max-width: 900px) {
    .directory-layout {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }

    .directory-sidebar {
        margin-bottom: 2rem;
    }
}

/* Professional Design Update */
.card {
    border-radius: 16px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden;
}

.btn {
    border-radius: 10px !important;
}