:root {
    /* Colors */
    --primary: #00d0ff;
    --primary-glow: rgba(0, 208, 255, 0.4);
    --background: #0b1215;
    --background-darker: #05080a;
    --card-bg: #162226;
    --card-border: rgba(255, 255, 255, 0.05);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --white: #ffffff;
    
    /* Gradients */
    --hero-gradient: radial-gradient(circle at 25% 40%, #0a191e 0%, #040809 100%);
    --code-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    
    /* Layout */
    --container-max-width: 1200px;
    --header-height: 72px;
    --sidebar-width: 280px;
    --toc-width: 240px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--hero-gradient);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: #262626;
    border-radius: 4px;
    border: 2px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #262626 var(--background);
}

/* Selection */
::selection {
    background: rgba(0, 208, 255, 0.3);
    color: var(--primary);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.flex { display: flex; }
.flex-column { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 32px; }
.gap-8 { gap: 32px; }

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 10px;
}

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

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--white);
}

/* Glassmorphism */
.glass {
    background: rgba(11, 18, 21, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(0, 208, 255, 0.3);
    transform: translateY(-5px);
}

/* Header & Nav */
.header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: rgba(11, 18, 21, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.nav-loading {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 208, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
}

.user-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--primary);
}

.user-chip span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
}

.btn-nav {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-github {
    background: #24292e;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-github:hover {
    background: #2f363d;
    transform: translateY(-2px);
}

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

.btn-primary-nav:hover {
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-logout-minimal {
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-logout-minimal:hover {
    background: rgba(248, 113, 113, 0.1);
    transform: scale(1.1);
}

.btn-logout-minimal span {
    font-size: 20px;
}

/* Sections */
section {
    padding: 100px 0;
}

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

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

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 208, 255, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(0, 208, 255, 0.2);
    width: fit-content;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
}

.pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Grid Utils */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-hero { 
    grid-template-columns: 1fr 1px minmax(300px, 630px);
    width: 100%;
}
@media (max-width: 1024px) {
    .grid-hero { 
        grid-template-columns: 1fr; 
        gap: 32px; 
    }
    .hero-visual {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

.hero h1 {
    font-size: clamp(2.25rem, 8vw, 4.5rem);
    color: var(--white);
    line-height: 1.1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    max-width: 100%; /* Permitir que ocupe todo el espacio de su columna */
}

/* --- Code Highlighting (Stitch Style) --- */
.code-card {
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.code-header {
    background: #111827;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.tab {
    margin-left: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #4b5563;
    letter-spacing: 0.02em;
}

.code-body {
    padding: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
}

.code-keyword { color: #38bdf8; }
.code-func { color: #38bdf8; }
.code-string { color: #4ade80; }
.code-key { color: #38bdf8; }
.code-val { color: #4ade80; }
.code-comment { color: #64748b; }

.code-output-block {
    margin-top: 24px;
    background: #111827;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(56, 189, 248, 0.05);
}

/* --- Features (Stitch Style) --- */
.feature-card {
    background: #162226;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 208, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(0, 208, 255, 0.1);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(0, 208, 255, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.feature-icon-wrapper .material-symbols-outlined {
    font-size: 24px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

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

/* Pricing Section */
.pricing-grid {
    margin-top: 64px;
}

.pricing-card {
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.plan-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(0, 208, 255, 0.1);
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(0, 208, 255, 0.2);
}

.plan-price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin: 16px 0 4px;
    line-height: 1;
}

.plan-price.highlight {
    color: var(--primary);
}

.plan-duration {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.plan-features {
    padding: 0;
    margin: 0 0 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.plan-features li .material-symbols-outlined {
    color: var(--primary);
    font-size: 20px;
}

.pricing-footer {
    margin-top: auto;
}

/* Featured Plan (Permanent) */
.featured-plan {
    border-color: rgba(0, 208, 255, 0.4);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 208, 255, 0.1);
}

.featured-plan::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--primary));
    border-radius: inherit;
    z-index: -1;
    opacity: 0.3;
}

.featured-plan:hover {
    box-shadow: 0 0 60px rgba(0, 208, 255, 0.25);
    border-color: var(--primary);
}

.best-value {
    position: absolute;
    top: -60px;
    right: -10px;
    background: var(--primary);
    color: var(--background);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    transform: rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 208, 255, 0.3);
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

/* Endpoints Section */
.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: var(--transition);
}

.endpoint-item:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.method {
    background: rgba(0, 208, 255, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 900;
}

.path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--white);
    flex: 1;
}

.endpoint-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.endpoint-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.endpoint-item.disabled:hover {
    transform: none;
    border-color: var(--card-border);
}

.endpoint-item.disabled .method {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* CTA Section */
.cta-box {
    background: linear-gradient(135deg, rgba(0, 208, 255, 0.1) 0%, transparent 100%);
    border: 1px solid rgba(0, 208, 255, 0.2);
    border-radius: 32px;
    padding: 80px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.cta-box h2 {
    font-size: 3rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 16px;
}

/* FooterStyles */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--background-darker);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-nav h4 {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #475569;
}

.status-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .hero-content { align-items: center; }
    .hero h1 { font-size: 3.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
    header { height: auto; padding: 16px 0; }
    nav { display: none; }
    .hero h1 { font-size: 2.75rem; }
    .cta-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.hero-content > * {
    animation: fadeIn 0.8s ease-out forwards;
}

.hero-content h1 { animation-delay: 0.2s; opacity: 0; }
.hero-content p { animation-delay: 0.4s; opacity: 0; }
.hero-content .cta-group { animation-delay: 0.6s; opacity: 0; }

/* --- Documentation Specific Styles --- */

.docs-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--card-border);
    padding: 40px 24px;
    background: var(--background);
    z-index: 100;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: 100%;
}

.nav-group h5 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(0, 208, 255, 0.1);
}

.nav-link .material-symbols-outlined {
    font-size: 20px;
}

/* Docs Content */
.docs-main {
    flex: 1;
    padding: 60px 40px 100px;
    margin-left: var(--sidebar-width);
    margin-right: var(--toc-width);
}

/* Endpoints List */
.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.endpoint-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch !important; /* Force children (endpoint-main) to span full width on PC */
}

.endpoint-main {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch !important; /* Force route, info, and buttons to span full width */
    width: 100%;
    box-sizing: border-box;
}

.endpoint-route {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #0a0a0a;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    width: 100% !important; /* Ensure full width on all screens */
    box-sizing: border-box;
}

.endpoint-route .method {
    color: #10b981;
    font-weight: 800;
    font-size: 0.75rem;
}

.endpoint-route .base {
    color: var(--text-muted);
}

.endpoint-route .path {
    color: var(--white);
    font-weight: 600;
}

.endpoint-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.endpoint-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Response Area */
.response-area {
    background: #0a0a0a;
    border-top: 1px solid var(--card-border);
    padding: 20px;
    display: none; /* Shown via JS */
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.response-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
}

.response-meta {
    display: flex;
    gap: 12px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.time-badge {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.response-body {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    max-height: 400px;
    overflow: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #94a3b8;
    white-space: pre;
}

/* Button Test (Probar) - Refined */
.btn-try {
    width: 100% !important;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0b1215;
    background: var(--white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-try:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-try:active {
    transform: scale(0.98);
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.docs-breadcrumb .active {
    color: var(--primary);
}

.docs-header h1 {
    font-size: 3rem;
    margin-bottom: 12px;
    margin-top: -80px;
}

.docs-header p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: -50px;
}

/* Config Card */
.config-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 48px;
}

.config-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 16px;
}

.endpoint-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0a0a0a;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.method-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Alerts */
.alert {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid transparent;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.alert-warning .material-symbols-outlined { color: #f59e0b; }

.alert-note {
    background: rgba(0, 208, 255, 0.1);
    border-color: var(--primary);
}

.alert-note .material-symbols-outlined { color: var(--primary); }

.alert-content h6 {
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.alert-content p {
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Code Snippets */
.snippet-window {
    background: #0a0a0a;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
}

.snippet-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
}

.tab-btn {
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--white);
}

.tab-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 208, 255, 0.05);
}

.snippet-content {
    padding: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    overflow-x: auto;
}

/* BCV Converter */

input#input-bs::-webkit-outer-spin-button,
input#input-bs::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input#input-bs {
    -moz-appearance: textfield;
    appearance: textfield;
}


input#input-usd::-webkit-outer-spin-button,
input#input-usd::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input#input-usd {
    -moz-appearance: textfield;
    appearance: textfield;
}


/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--card-border));
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    width: 12px;
    height: 12px;
    background: var(--background);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 10;
}

.version-badge {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 20px;
    border-radius: 12px;
}

/* TOC */
.toc {
    width: var(--toc-width);
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    padding: 40px 24px;
    border-left: 1px solid var(--card-border);
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.toc-link {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 2px solid transparent;
}

.toc-link:hover {
    color: var(--white);
}

.toc-link.active {
    color: var(--primary);
    border-color: var(--primary);
}

/* Transitions */
.hero-visual {
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

/* --- Hero Revisions --- */
.dot-pulse {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 8px;
}

.dot-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Feature Cards Refined */
.features .grid-3 {
    margin-top: 64px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

/* Endpoints UI */
.endpoints-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.endpoint-row {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.endpoint-row:hover {
    transform: translateX(8px);
    border-color: rgba(0, 208, 255, 0.3);
}

.endpoint-row.upcoming {
    opacity: 0.5;
}

.method-tag {
    background: rgba(0, 208, 255, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.method-tag.disabled {
    background: #262626;
    color: #525252;
}

.endpoint-path {
    flex: 1;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--white);
}

.endpoint-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

/* CTA Banner Modern */
.cta-banner {
    background: linear-gradient(135deg, rgba(0, 208, 255, 0.15), rgba(0, 208, 255, 0.05));
    border: 1px solid rgba(0, 208, 255, 0.2);
    padding: 80px 40px;
    border-radius: 32px;
    text-align: center;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-muted);
    max-width: 320px;
}

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

.footer-links h4 {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

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

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator .dot.online {
    background: #10b981;
}

/* Modal Dialog Styles */
.modal-dialog {
    border: none !important;
    background: #0f172a !important;
    border-radius: 20px !important;
    padding: 0 !important;
    max-width: 500px !important;
    width: 95% !important;
    color: white !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.2) !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-dialog[open] {
    display: flex;
    flex-direction: column;
}

/* --- Floating Auth UI (Landing Page) --- */
.floating-auth {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    pointer-events: auto;
    width: auto !important;
    left: auto !important;
}

.floating-auth #nav-menu {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(11, 18, 21, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: fit-content;
}

.cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.cta-group .btn {
    width: auto;
    min-width: 180px;
}

.hero-content {
    max-width: 700px;
}

/* --- Responsiveness & Breakpoints (PC, Laptop, Tablet, Mobile) --- */

/* 1. Large Screen Optimization (Full Desktop) */
@media (min-width: 1441px) {
    .docs-main {
        max-width: 1000px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 80px 60px;
        border-left: 1px solid var(--card-border);
        border-right: 1px solid var(--card-border);
        background: rgba(255, 255, 255, 0.01);
    }
}

/* 2. Transition Range (Small Laptops & Large Tablets) */
@media (min-width: 1281px) and (max-width: 1440px) {
    :root {
        --toc-width: 0px; /* Hide TOC in this range to avoid overlap */
    }
    .toc {
        display: none !important;
    }
    .docs-main {
        margin-left: var(--sidebar-width);
        margin-right: 0;
        width: calc(100% - var(--sidebar-width)) !important;
        max-width: none !important;
    }
}

/* 3. Small Laptop & Tablet (Trigger hide sidebars if needed) */
@media (max-width: 1280px) {
    :root {
        --toc-width: 0px;
    }
    
    .docs-main {
        margin-right: 0 !important;
        padding-left: 24px;
        padding-right: 24px;
        margin-left: var(--sidebar-width);
    }
    
    .sidebar {
        width: 260px;
    }

    .toc {
        display: none !important;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .cta-group {
        justify-content: center;
    }
}

/* 3. Mobile (6.6" / ~430px) Optimization */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        --header-height: 70px;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 2500;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.8);
        background: #0a0e14 !important;
        padding-top: 100px; /* Space for the closer toggle */
        padding-bottom: 120px; /* Space to see the 'Volver al Inicio' button */
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .sidebar-nav {
        flex: none; /* Avoid margin-top: auto pushing content out */
        height: auto;
        padding-bottom: 40px;
    }

    .sidebar.active {
        left: 0;
    }

    .docs-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 85px 16px 40px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }

    .toc {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: flex !important;
        position: fixed;
        top: 20px;
        left: 16px;
        z-index: 2600;
        background: var(--primary);
        color: var(--background);
        width: 42px;
        height: 42px;
        border-radius: 10px;
        border: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 208, 255, 0.3);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        z-index: 2450;
    }

    .sidebar-overlay.active {
        display: block;
    }
    
    .hero {
        padding: 60px 0 40px;
        min-height: auto;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero h1 {
        font-size: 2.25rem;
        margin-bottom: 20px;
    }

    .hero p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.7);
    }

    .floating-auth {
        top: 15px;
        right: 15px;
    }

    .floating-auth #nav-menu {
        background: rgba(11, 18, 21, 0.8);
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .cta-group .btn {
        width: 100%;
        min-width: 0;
    }

    .code-card {
        margin-top: 40px;
        width: 100%;
        font-size: 0.7rem;
    }

    .code-body pre {
        white-space: pre-wrap;
        word-break: break-all;
    }

    /* Fix JSON response body on mobile */
    .response-body {
        white-space: pre-wrap !important;
        word-break: break-all !important;
        font-size: 0.75rem !important;
        line-height: 1.5;
    }

    /* REVAMPED Unified full-width endpoint UI on mobile */
    .endpoints-list .endpoint-item .endpoint-main {
        padding: 14px 16px !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .endpoints-list .endpoint-item .endpoint-main > div,
    .endpoints-list .endpoint-item .endpoint-main > button {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .endpoint-route {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }

    .endpoint-route::-webkit-scrollbar {
        height: 0px;
    }

    .endpoint-path {
        white-space: nowrap !important;
        flex: none !important;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
}
