body {
    background-color: #050505;
    --gradient-angle: 0deg;
}

/* Estilos para la barra de desplazamiento elegante GLOBAL - Ultra Sutil en Escritorio, más notable en Móvil */

/* Para WebKit (Chrome, Safari, Edge, Opera) */
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 3px; 
    height: 2px;
}

body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: transparent; /* Riel completamente transparente */
}

body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background-color: rgba(80, 80, 80, 0.25); /* Pulgar muy sutil, casi invisible */
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 100, 100, 0.4); /* Un poco más visible al pasar el mouse */
}
.app-container.sidebar-active .main-content-wrapper {
    padding-left: 320px; /* Ajustar el padding del contenido principal al nuevo ancho */
}

/* Para Firefox */
html {
    scrollbar-width: thin; 
    scrollbar-color: rgba(80, 80, 80, 0.25) transparent; /* pulgar sutil, riel transparente */
}
body { 
    scrollbar-width: thin;
    scrollbar-color: rgba(80, 80, 80, 0.25) transparent;
}
.sidebar {
    width: 320px;
}
#introduccion p {
    font-size: 0.95rem;
    color: #bdbdbd;

}
/* Estilos para Móvil - Barra de desplazamiento un poco más notable pero aún sutil */
@media (max-width: 768px) {
    body::-webkit-scrollbar,
    *::-webkit-scrollbar {
        width: 7px; /* Ligeramente más ancha en móvil */
        height: 7px;
    }

    body::-webkit-scrollbar-thumb,
    *::-webkit-scrollbar-thumb {
        background-color: rgba(90, 90, 90, 0.4); /* Pulgar un poco más opaco/oscuro en móvil */
    }

    body::-webkit-scrollbar-thumb:hover,
    *::-webkit-scrollbar-thumb:hover {
        background-color: rgba(120, 120, 120, 0.6);
    }

    /* Para Firefox en móvil, mantenemos el estilo 'thin' y los colores base, 
       ya que son bastante sutiles. Ajustes más finos requerirían JS. */
    html {
      scrollbar-color: rgba(90, 90, 90, 0.4) transparent;
    }
    body {
      scrollbar-color: rgba(90, 90, 90, 0.4) transparent;
    }
}


.api-docs-content {
    padding: 20px 25px;
    max-width: 960px;
    margin: 0 auto;
}

.api-docs-hero {
    text-align: center;
    padding: 30px 0 40px 0;
    margin-bottom: 30px;
    position: relative;
}

.api-docs-hero h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: #e8e8e8;
    margin-bottom: 30px;
}
.api-docs-hero h1 .gradient-text {
    font-size: inherit;
}

.api-search-form {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    border-radius: 32px; 
    background-color: #0c0c0e; 
    padding: 2px;
    transition: all 0.3s ease-in-out;
}

.api-search-form::before {
    content: '';
    position: absolute;
    top: -2px; 
    left: -2px; 
    right: -2px; 
    bottom: -2px;
    background: conic-gradient(
        from var(--gradient-angle),
        #4a01b2, #5b12d9, #2d35ff, #007aff, #1b75d2, #4a01b2
    );
    border-radius: inherit; 
    z-index: -1;
    filter: blur(5px); 
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.api-search-form:focus-within::before {
    opacity: 0.7; 
    transform: scale(1);
    animation: rotateGradientBorder 4s linear infinite;
}

@keyframes rotateGradientBorder {
    0% { --gradient-angle: 0deg; }
    100% { --gradient-angle: 360deg; }
}

.api-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #0c0c0e;
    border-radius: 30px;
}

.api-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    width: 22px;
    height: 22px;
    z-index: 1;
}

#apiSearchInput {
    width: 100%;
    padding: 16px 25px 16px 60px;
    font-size: 1.05rem;
    color: #e0e0e0;
    background-color: transparent;
    border: none;
    border-radius: 30px;
    box-sizing: border-box;
    outline: none;
}

#apiSearchInput::placeholder {
    color: #505050;
}

#apiSearchResultsContainer {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background-color: #0e0e10;
    border: 1px solid #2c2c2f;
    border-radius: 12px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}


.api-search-result-item {
    display: block;
    padding: 12px 20px;
    color: #b8b8b8;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid #1f1f22;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.api-search-result-item:last-child {
    border-bottom: none;
}

.api-search-result-item:hover,
.api-search-result-item:focus {
    background-color: #1a1a1c;
    color: #ffffff;
    outline: none;
}
.api-search-result-item mark {
    background-color: rgba(92, 156, 229, 0.2);
    color: #8ab4f8;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 500;
}
.api-search-no-results {
    padding: 15px 20px;
    color: #777;
    text-align: center;
    font-style: italic;
}

.api-section {
    padding-top: 40px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #1f1f1f;
}
.api-section:last-of-type {
    border-bottom: none;
}

.api-section h2 {
    font-size: 1.7rem;
    color: #e0e0e0;
    margin-bottom: 20px;
    font-weight: 600;
    border-left: 4px solid;
    padding-left: 15px;
    border-image: linear-gradient(to bottom, #4a01b2, #2d35ff, #007aff) 1;
}

.useful-topics-section h2 {
    text-align: center;
    border-left: none;
    padding-left: 0;
    font-size: 1.9rem;
    margin-bottom: 30px;
}

.useful-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

.topic-card {
    border: 1px solid #2a2a2c;
    border-radius: 10px;
    padding: 20px 25px;
    text-decoration: none;
    color: #c0c0c0;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out, background-color 0.2s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: #444;
}

.topic-card-icon {
    margin-bottom: 15px;
    text-align: left;
}

.topic-card-icon i[data-lucide] {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.topic-card.color-accent-python { background-color: #121c25; }
.topic-card.color-accent-python .topic-card-icon i[data-lucide] { color: #4B8BBE; }

.topic-card.color-accent-becas { background-color: #26210e; }
.topic-card.color-accent-becas .topic-card-icon i[data-lucide] { color: #FFC107; }

.topic-card.color-accent-casos { background-color: #142415; }
.topic-card.color-accent-casos .topic-card-icon i[data-lucide] { color: #4CAF50; }

.topic-card.color-accent-inicio { background-color: #291311; }
.topic-card.color-accent-inicio .topic-card-icon i[data-lucide] { color: #F44336; }

.topic-card.color-accent-sdks { background-color: #1f1023; }
.topic-card.color-accent-sdks .topic-card-icon i[data-lucide] { color: #9C27B0; }

.topic-card.color-accent-comunidad { background-color: #0d1f28; }
.topic-card.color-accent-comunidad .topic-card-icon i[data-lucide] { color: #03A9F4; }


.topic-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 8px;
}

.topic-card-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #999;
    flex-grow: 1;
}

.general-guide-section p, .general-guide-section pre {
    font-size: 0.95rem;
    color: #c0c0c0;
    line-height: 1.7;
    margin-bottom: 15px;
}
.general-guide-section pre {
    background-color: #0c0c0e;
    border: 1px solid #2a2a2c;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    color: #b3d4fc;
}
.general-guide-section code {
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    background-color: #1a1a1c;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.85em;
}
.general-guide-section a {
    color: #8ab4f8;
    text-decoration: underline;
}
.general-guide-section a:hover {
    color: #a7c7f7;
}

.api-docs-footer {
    background-color: #0a0a0c;
    padding: 40px 25px 30px;
    margin-top: 50px;
    border-top: 1px solid #1f1f1f;
}

.footer-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 30px auto;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #d0d0d0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: #bbb;
    text-decoration: underline;
}

.footer-social-copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #1f1f1f;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-social-links {
    margin-bottom: 15px;
}

.footer-social-links a {
    color: #777;
    margin: 0 12px;
    display: inline-block;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-links a:hover {
    color: #ccc;
    transform: scale(1.1);
}

.footer-social-links i[data-lucide] {
    width: 22px;
    height: 22px;
}

.footer-social-copyright p {
    color: #666;
    font-size: 0.85rem;
}

.highlight-section-on-search {
    animation: highlightPulse 2.5s ease-out;
}

@keyframes highlightPulse {
    0% { background-color: transparent; }
    20% { background-color: rgba(92, 156, 229, 0.08); }
    100% { background-color: transparent; }
}

@media (max-width: 768px) {
    .api-docs-hero h1 {
        font-size: 1.9rem;
    }
    #apiSearchInput {
        padding: 14px 20px 14px 50px;
        font-size: 1rem;
    }
    .api-section h2 {
        font-size: 1.6rem;
    }
    .useful-topics-grid {
        grid-template-columns: 1fr;
    }
    .footer-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .api-docs-hero h1 {
        font-size: 1.7rem;
    }
    .topic-card {
        padding: 15px 20px;
    }
    .topic-card-title {
        font-size: 1.1rem;
    }
    .topic-card-description {
        font-size: 0.85rem;
    }
    .footer-content-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column h4 {
        margin-top: 15px;
    }
    .footer-column:first-child h4 {
        margin-top: 0;
    }
}
