/* ==========================================
   LAB - Estilos completos
   ========================================== */

/* Variables */
:root {
    --lab-bg: #0f1115;
    --lab-card: #161a22;
    --lab-border: rgba(255, 255, 255, 0.08);
    --lab-text: #e6e6e6;
    --lab-muted: #9aa0a6;
    --lab-accent: #4da3ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #0a0c12;
    color: var(--lab-text);
    line-height: 1.5;
    min-height: 100vh;
}

/* ===== DESKTOP ===== */
.lab-desktop {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

@media (min-width: 769px) {
    .lab-desktop {
        display: block;
    }
}

.lab-desktop-header {
    margin-bottom: 32px;
}

.lab-desktop-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, var(--lab-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lab-desktop-header p {
    color: var(--lab-muted);
    font-size: 16px;
}

.lab-desktop-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.lab-desktop-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--lab-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.lab-desktop-chip.active {
    background: var(--lab-accent);
    color: white;
}

.lab-desktop-chip:hover {
    border-color: var(--lab-accent);
}

.lab-desktop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.lab-desktop-card {
    background: var(--lab-card);
    border: 1px solid var(--lab-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.lab-desktop-card:hover {
    border-color: var(--lab-accent);
    transform: translateY(-2px);
}

.lab-desktop-card.active {
    border-color: var(--lab-accent);
    background: rgba(77, 163, 255, 0.05);
}



.lab-desktop-card-icon i,
.lab-desktop-card-icon .fas,
.lab-desktop-card-icon .fab {
    font-size: 24px;
    color: var(--lab-accent, #5c6eff);
    display: inline-block;
}


.lab-desktop-card-icon {
     font-size: 24px;
    color: var(--lab-accent, #5c6eff);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(77, 163, 255, 0.1);
    border-radius: 12px;
    color: var(--lab-accent);
    font-size: 22px;
    margin-bottom: 16px;
}

.lab-desktop-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lab-desktop-card-category {
    font-size: 13px;
    color: var(--lab-muted);
    margin-bottom: 12px;
}

.lab-desktop-card-desc {
    font-size: 14px;
    color: var(--lab-muted);
    line-height: 1.4;
}

.lab-desktop-viewer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--lab-border);
    display: none;
}

.lab-desktop-viewer.active {
    display: block;
}

.lab-desktop-viewer-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.lab-desktop-back {
    background: none;
    border: 1px solid var(--lab-border);
    color: var(--lab-muted);
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.lab-desktop-back:hover {
    border-color: var(--lab-accent);
    color: var(--lab-accent);
}

.lab-desktop-viewer-title {
    font-size: 24px;
    font-weight: 600;
}

.lab-desktop-viewer-desc {
    color: var(--lab-muted);
    margin-bottom: 24px;
}

.lab-desktop-demo {
    background: var(--lab-card);
    border: 1px solid var(--lab-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    min-height: 200px;
}

.lab-desktop-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--lab-border);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.lab-desktop-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--lab-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.lab-desktop-tab.active {
    background: rgba(77, 163, 255, 0.1);
    color: var(--lab-accent);
}

.lab-desktop-pane {
    display: none;
}

.lab-desktop-pane.active {
    display: block;
}

.lab-pane-title {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 12px;
}

.lab-pane-title:first-child {
    margin-top: 0;
}

.lab-bullet-list {
    list-style: none;
}

.lab-bullet-list li {
    padding-left: 24px;
    position: relative;
    font-size: 15px;
    color: var(--lab-muted);
    margin-bottom: 8px;
}

.lab-bullet-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--lab-accent);
}

.lab-code-block {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    overflow-x: auto;
    color: #e6e6e6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== MOBILE ===== */
.lab-mobile {
    display: none;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--lab-bg);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .lab-mobile {
        display: block;
    }

.lab-mobile-card-icon i {
    font-size: 20px;
    color: var(--lab-accent, #5c6eff);
}

}

.lab-mobile-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    background: var(--lab-bg);
    border-bottom: 1px solid var(--lab-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.lab-mobile-header-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.lab-mobile-header-hidden {
    display: none !important;
}

.lab-mobile-header-title {
    font-size: 20px;
    font-weight: 600;
}

.lab-mobile-menu-btn {
    background: none;
    border: none;
    color: var(--lab-muted);
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
}

.lab-mobile-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--lab-accent);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
    min-height: 44px;
}

.lab-mobile-screens {
    position: relative;
    width: 100%;
    height: calc(100vh - 56px);
    overflow: hidden;
}

.lab-mobile-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.25s ease-out;
    background: var(--lab-bg);
    padding: 16px;
}

.lab-mobile-explorer {
    transform: translateX(0);
}

.lab-mobile-viewer {
    transform: translateX(100%);
}

.lab-mobile-screens.viewer-active .lab-mobile-explorer {
    transform: translateX(-100%);
}

.lab-mobile-screens.viewer-active .lab-mobile-viewer {
    transform: translateX(0);
}

.lab-mobile-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lab-mobile-desc {
    font-size: 14px;
    color: var(--lab-muted);
    margin-bottom: 20px;
}

.lab-mobile-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.lab-mobile-filters::-webkit-scrollbar {
    display: none;
}

.lab-mobile-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--lab-muted);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.lab-mobile-chip.active {
    background: var(--lab-accent);
    color: white;
}

.lab-mobile-card {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--lab-card);
    border: 1px solid var(--lab-border);
    cursor: pointer;
    margin-bottom: 10px;
    min-height: 72px;
}

.lab-mobile-card.active {
    border-color: var(--lab-accent);
    background: rgba(77, 163, 255, 0.05);
}

.lab-mobile-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(77, 163, 255, 0.1);
    border-radius: 10px;
    color: var(--lab-accent);
    margin-right: 14px;
    flex-shrink: 0;
}

.lab-mobile-card-content {
    flex: 1;
}

.lab-mobile-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.lab-mobile-card-category {
    font-size: 12px;
    color: var(--lab-muted);
}

.lab-mobile-card-arrow {
    color: var(--lab-muted);
    flex-shrink: 0;
}

.lab-mobile-viewer-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lab-mobile-viewer-desc {
    font-size: 14px;
    color: var(--lab-muted);
    margin-bottom: 20px;
}

.lab-mobile-demo {
    min-height: 180px;
    border-radius: 12px;
    background: var(--lab-card);
    border: 1px solid var(--lab-border);
    padding: 16px;
    margin-bottom: 20px;
}

.lab-mobile-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--lab-border);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.lab-mobile-tab {
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--lab-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    min-height: 44px;
}

.lab-mobile-tab.active {
    background: rgba(77, 163, 255, 0.1);
    color: var(--lab-accent);
}

.lab-mobile-pane {
    display: none;
}

.lab-mobile-pane.active {
    display: block;
}

/* Código en móvil */
.lab-mobile .lab-code-block {
    font-size: 12px;
    padding: 12px;
}

.lab-mobile .lab-bullet-list li {
    font-size: 14px;
}

/* Footer del viewer */
.lab-viewer-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--lab-border);
    text-align: center;
    color: var(--lab-muted);
    font-size: 14px;
}

.lab-footer-link {
    color: var(--lab-accent);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: all 0.2s;
}

.lab-footer-link:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* En móvil ajustar espaciado */
@media (max-width: 768px) {
    .lab-viewer-footer {
        margin-top: 24px;
        padding-top: 16px;
        font-size: 13px;
    }
}


/* Footer global */
.lab-global-footer {
    padding: 24px 16px;
    text-align: center;
    border-top: 1px solid var(--lab-border);
    margin-top: 40px;
}

.lab-footer-content {
    color: var(--lab-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lab-footer-divider {
    opacity: 0.3;
}

.lab-footer-link {
    color: var(--lab-accent);
    text-decoration: none;
    font-weight: 500;
}

.lab-footer-link:hover {
    text-decoration: underline;
}

/* En móvil */
@media (max-width: 768px) {
    .lab-global-footer {
        padding: 20px 16px;
        margin-bottom: 0;
    }
    
    .lab-footer-content {
        flex-direction: column;
        gap: 4px;
    }
    
    .lab-footer-divider {
        display: none;
    }
}