/* Fuentes y General */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=JetBrains+Mono&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

code, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Gestion de Pestanas */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Botones de Matematicas */
.btn-math {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-math:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-math:active {
    transform: scale(0.95);
}

/* Estilos de las Matrices */
.matrix-input {
    width: 100%;
    aspect-ratio: 1;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0;
    background-color: white;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s;
}

.matrix-input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.matrix-grid {
    display: inline-grid;
    gap: 4px;
    border-left: 3px solid #4f46e5;
    border-right: 3px solid #4f46e5;
    border-radius: 8px;
    overflow: auto;
    margin: 10px auto;
    background-color: transparent;
    padding: 0;
}

/* Tamano normal para matrices pequenas (hasta 6x6) */
.matrix-grid.size-small {
    max-height: none;
    max-width: none;
}

.matrix-grid.size-small .matrix-input {
    font-size: 1rem;
    min-width: 50px;
}

/* Tamano compacto para matrices grandes (5x5+) */
.matrix-grid.size-large {
    max-height: 450px;
    max-width: 700px;
    gap: 2px;
    padding: 3px;
    background-color: #e2e8f0;
}

.matrix-grid.size-large .matrix-input {
    font-size: 0.75rem;
}

.matrix-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}