@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=DM+Mono:wght@400;500&display=swap');

:root {
    --bg-deep: #050510;
    --text-main: #ffffff;
    --text-mut: rgba(255, 255, 255, 0.7);
    --glass-surf: rgba(255, 255, 255, 0.03);
    --glass-bord: rgba(255, 255, 255, 0.08);
    --accent-glow: 0 0 20px rgba(0, 243, 255, 0.3);

    --grad-mesh: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);

    --font-head: 'Outfit', sans-serif;
    --font-code: 'DM Mono', monospace;

    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-head);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.5;
}

/* --- NEURAL NETWORK CANVAS --- */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    opacity: 0.6;
}

/* --- COSMIC NEBULA BACKGROUND --- */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.25), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 144, 255, 0.2), transparent 45%),
        radial-gradient(ellipse at 50% 70%, rgba(255, 20, 147, 0.15), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0, 191, 255, 0.1), transparent 40%);
    filter: blur(60px);
    animation: nebula-drift 30s infinite alternate ease-in-out;
}

@keyframes nebula-drift {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.05) rotate(2deg);
    }

    100% {
        transform: scale(1) rotate(-2deg);
    }
}

/* --- GRID OVERLAY (SUBTLE) --- */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 40%, transparent);
}

/* --- LAYOUT --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-bottom: 4rem;
}

.brand {
    font-weight: 800;
    letter-spacing: -1px;
    font-size: 1.5rem;
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-check {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(74, 222, 128, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
}

/* --- HERO --- */
.hero {
    text-align: center;
    padding: 4rem 0 8rem;
    position: relative;
}

h1 {
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-mut);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: #fff;
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 99px;
    transition: all 0.3s var(--ease-elastic);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
}

/* --- CONTENT MASONRY --- */
.masonry-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.card {
    background: var(--glass-surf);
    border: 1px solid var(--glass-bord);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s var(--ease-elastic);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-mut);
    margin-bottom: 1.5rem;
    display: block;
    font-weight: 600;
}

/* API Tabs */
.api-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-bord);
    padding-bottom: 1rem;
}

.api-tab {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-family: var(--font-code);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-bord);
    border-radius: 6px;
    color: var(--text-mut);
    cursor: pointer;
    transition: all 0.3s ease;
}

.api-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.api-tab.active {
    background: rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.5);
    color: #fff;
}

.api-card-main {
    max-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.api-card-main .api-list {
    overflow-y: auto;
    flex: 1;
}

/* API LIST */
.api-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.api-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.method {
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.get {
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
}

.post {
    background: rgba(0, 255, 100, 0.1);
    color: #00ff64;
}

.path {
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 500;
}

/* DOCS */
.doc-card {
    position: sticky;
    top: 2rem;
}

.doc-item {
    border-bottom: 1px solid var(--glass-bord);
}

.doc-head {
    padding: 1.5rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    transition: color 0.3s ease;
}

.doc-head:hover {
    color: #fff;
}

.doc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-mut);
    line-height: 1.8;
}

.doc-body.open {
    max-height: 600px;
    padding-bottom: 1.5rem;
}

/* --- HERO DESCRIPTION --- */
.hero-desc {
    font-size: 1.25rem;
    color: var(--text-mut);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* --- INFO SECTIONS --- */
.info-section {
    margin-bottom: 4rem;
    padding: 3rem;
    background: var(--glass-surf);
    border: 1px solid var(--glass-bord);
    border-radius: 24px;
    backdrop-filter: blur(20px);
}

.section-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- ARCHITECTURE DIAGRAM --- */
.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arch-layer {
    width: 100%;
    max-width: 700px;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(var(--layer-color-rgb, 124, 58, 237), 0.15), transparent);
    border: 1px solid var(--layer-color);
    border-radius: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(var(--layer-color-rgb, 124, 58, 237), 0.1);
    transition: all 0.3s ease;
}

.arch-layer:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(var(--layer-color-rgb, 124, 58, 237), 0.3);
}

.layer-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.layer-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.layer-items span {
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-mut);
}

.arch-arrow {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    animation: arrow-pulse 2s infinite;
}

@keyframes arrow-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 0.8;
        transform: translateY(3px);
    }
}

/* --- END-TO-END FLOW --- */
.flow-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.flow-step {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-bord);
    border-radius: 16px;
    max-width: 300px;
    transition: all 0.3s ease;
}

.flow-step:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(138, 43, 226, 0.3);
    transform: translateY(-3px);
}

.flow-step.highlight {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(59, 130, 246, 0.1));
    border-color: rgba(138, 43, 226, 0.5);
}

.step-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.step-content p {
    font-size: 0.8rem;
    color: var(--text-mut);
    line-height: 1.5;
}

.flow-connector {
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
}

/* --- AI CARDS GRID --- */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ai-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-bord);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-card:hover {
    border-color: rgba(0, 243, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.ai-card-head {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(138, 43, 226, 0.1));
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid var(--glass-bord);
}

.ai-card-body {
    padding: 1.5rem;
}

.ai-card-body code {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.ai-card-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-card-body li {
    font-size: 0.85rem;
    color: var(--text-mut);
    padding-left: 1.2rem;
    position: relative;
}

.ai-card-body li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #8b5cf6;
}

/* --- WEIGHT MANAGEMENT FLOW --- */
.weight-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.weight-box {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-bord);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.weight-box:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
}

.weight-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.weight-title {
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.weight-box p {
    font-size: 0.8rem;
    color: var(--text-mut);
    line-height: 1.5;
}

.weight-box code {
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.weight-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    animation: arrow-pulse 2s infinite;
}

/* --- SCHEDULE GRID --- */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.schedule-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-bord);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(74, 222, 128, 0.3);
}

.schedule-freq {
    font-family: var(--font-code);
    font-size: 0.7rem;
    font-weight: 500;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    width: fit-content;
}

.schedule-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 3rem 2rem;
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    border-top: 1px solid var(--glass-bord);
    margin-top: 4rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .flow-container {
        flex-direction: column;
    }

    .flow-connector {
        width: 2px;
        height: 20px;
        background: linear-gradient(180deg, transparent, #8b5cf6, transparent);
    }

    .weight-flow {
        flex-direction: column;
    }

    .weight-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .info-section {
        padding: 1.5rem;
    }

    .section-heading {
        font-size: 1.4rem;
    }

    .hero-desc {
        font-size: 1rem;
    }
}