/* ============================================
   ESTILO PARA BLOQUES DE CÓDIGO - mirpas.com
   Adaptado al diseño existente (Skel)
   ============================================ */

/* ===== CONTENEDOR PRINCIPAL ===== */
.code-wrapper {
    max-width: 100%;
    margin: 2rem 0;
    padding: 0;
}

/* ===== BLOQUE DE CÓDIGO ===== */
.code-block {
    background: #1e1e2e;
    border-radius: 12px;
    padding: 1.8rem 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-left: 6px solid #c084fc;
    overflow-x: auto;
    position: relative;
    margin: 1.5rem 0;
    transition: box-shadow 0.3s ease;
}

.code-block:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* ===== TEXTO DEL CÓDIGO ===== */
.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #e4e4f0;
    white-space: pre-wrap;
    word-break: break-word;
    display: block;
    background: transparent;
    border: none;
    padding: 0;
}

/* ===== RESALTADO DE SINTAXIS ===== */
.code-block .keyword { 
    color: #c084fc; 
    font-weight: 600; 
}

.code-block .string { 
    color: #a3e635; 
}

.code-block .comment { 
    color: #6b7280; 
    font-style: italic; 
}

.code-block .func { 
    color: #60a5fa; 
}

.code-block .number { 
    color: #fbbf24; 
}

.code-block .operator { 
    color: #f472b6; 
}

.code-block .variable { 
    color: #34d399; 
}

/* ===== BOTÓN COPIAR ===== */
.copy-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5a5b8;
    font-size: 0.75rem;
    padding: 5px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0px);
}

/* ===== LENGUAJE LABEL (opcional) ===== */
.code-lang {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
}

/* ===== RESPONSIVE: MÓVILES ===== */
@media (max-width: 768px) {
    .code-block {
        padding: 1.2rem 1.2rem;
        border-left-width: 4px;
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .code-block code {
        font-size: 0.78rem;
        line-height: 1.6;
    }
    
    .copy-btn {
        font-size: 0.6rem;
        padding: 3px 10px;
        top: 8px;
        right: 10px;
    }
    
    .code-lang {
        font-size: 0.55rem;
        bottom: 8px;
        right: 10px;
    }
}

/* ===== RESPONSIVE: TABLETS ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    .code-block code {
        font-size: 0.85rem;
    }
}

/* ===== TEMA CLARO (si el usuario prefiere) ===== */
@media (prefers-color-scheme: light) {
    .code-block {
        background: #f1f3f5;
        border-left-color: #7c3aed;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .code-block code {
        color: #1e293b;
    }
    
    .code-block .keyword { color: #7c3aed; }
    .code-block .string { color: #059669; }
    .code-block .comment { color: #94a3b8; }
    .code-block .func { color: #2563eb; }
    .code-block .number { color: #d97706; }
    .code-block .operator { color: #db2777; }
    .code-block .variable { color: #059669; }
    
    .copy-btn {
        background: rgba(0, 0, 0, 0.06);
        color: #64748b;
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    .copy-btn:hover {
        background: rgba(0, 0, 0, 0.12);
        color: #0f172a;
    }
    
    .code-lang {
        color: rgba(0, 0, 0, 0.15);
    }
}

/* ============================================
   DISCLAIMER ESTILO MIRPAS.COM
   ============================================ */

/* ===== OVERLAY ===== */
#disclaimerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeInDisclaimer 0.5s ease;
}

#disclaimerOverlay.active {
    display: flex;
}

@keyframes fadeInDisclaimer {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== MODAL ===== */
.disclaimer-modal {
    background: #1e1e2e;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
    border-left: 6px solid #c084fc;
    position: relative;
    animation: slideUpDisclaimer 0.5s ease;
}

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

/* ===== ICONO ===== */
.disclaimer-icon {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 0.2rem;
    line-height: 1;
}

/* ===== TÍTULO ===== */
.disclaimer-title {
    color: #e4e4f0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.3rem;
    font-family: 'JetBrains Mono', monospace;
}

.disclaimer-subtitle {
    color: #a5a5b8;
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ===== TEXTO ===== */
.disclaimer-text {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 1rem 0 1.5rem;
}

.disclaimer-text ul {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

.disclaimer-text li {
    margin: 0.5rem 0;
    color: #cbd5e1;
}

.disclaimer-text strong {
    color: #c084fc;
}

.disclaimer-text .highlight {
    color: #fbbf24;
}

/* ===== BOTONES ===== */
.disclaimer-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-disclaimer {
    padding: 0.75rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
    min-width: 130px;
    position: relative;
    overflow: hidden;
}

/* Botón Aceptar */
.btn-accept {
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-accept:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.btn-accept:active {
    transform: translateY(0) scale(0.98);
}

/* Botón Rechazar */
.btn-reject {
    background: rgba(255, 255, 255, 0.06);
    color: #a5a5b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e4e4f0;
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== ESTADO DE RECHAZO ===== */
.disclaimer-rejected {
    text-align: center;
    padding: 1.5rem 0;
}

.disclaimer-rejected .icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.disclaimer-rejected h3 {
    color: #f87171;
    margin-bottom: 0.5rem;
}

.disclaimer-rejected p {
    color: #a5a5b8;
    margin-bottom: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .disclaimer-modal {
        padding: 1.8rem 1.5rem 1.5rem;
        margin: 1rem;
        border-left-width: 4px;
    }
    
    .disclaimer-title {
        font-size: 1.2rem;
    }
    
    .disclaimer-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .disclaimer-text ul {
        padding-left: 1.2rem;
    }
    
    .btn-disclaimer {
        padding: 0.65rem 1.5rem;
        font-size: 0.85rem;
        min-width: 100px;
        width: 100%;
    }
    
    .disclaimer-buttons {
        flex-direction: column;
        gap: 0.7rem;
    }
    
    .disclaimer-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .disclaimer-modal {
        padding: 1.5rem 1rem 1.2rem;
        border-radius: 16px;
    }
    
    .disclaimer-text {
        font-size: 0.8rem;
    }
    
    .btn-disclaimer {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

/* ===== MEJORAS PARA EL BOTÓN COPIAR ===== */
.copy-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5a5b8;
    font-size: 0.75rem;
    padding: 5px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    user-select: none;
    white-space: nowrap;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0px) scale(0.95);
}

.copy-btn.copiado {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border-color: #4ade80;
}

.copy-btn.error {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border-color: #f87171;
}
.code-block .operator { 
    color: #f472b6; 
    font-weight: 600;
}

.code-block .variable { 
    color: #34d399; 
}

.code-block .docstring {
    color: #6b7280;
    font-style: italic;
}
