/* Calculadora Todo en Uno - Estilos */
.calculadora-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

.calculadora-container h2 {
    text-align: center;
    padding: 20px 0;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Pestañas de navegación */
.calculadora-tabs {
    display: flex;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-button {
    flex: 1;
    min-width: 120px;
    padding: 15px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Contenido de pestañas */
.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

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

.tab-panel h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 25px;
    text-align: center;
}

/* Calculadora Básica */
.calculator-display {
    margin-bottom: 20px;
}

.calculator-display input {
    width: 100%;
    height: 60px;
    font-size: 24px;
    text-align: right;
    padding: 0 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    box-sizing: border-box;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.calculator-buttons button {
    height: 60px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.calculator-buttons button:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.calculator-buttons button:active {
    transform: translateY(0);
}

/* Botón igual especial */
.calculator-buttons .btn-equals {
    background: #667eea;
    color: white;
    grid-column: span 1;
    grid-row: span 2;
}

.calculator-buttons .btn-equals:hover {
    background: #5a67d8;
}

/* Botón cero especial */
.calculator-buttons .btn-zero {
    grid-column: span 2;
}

/* Formularios de calculadora */
.calculator-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botones de acción */
.calculator-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.calculator-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.calculator-form button:active {
    transform: translateY(0);
}

/* Resultados */
.resultado {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 16px;
    line-height: 1.6;
}

.resultado div {
    margin-bottom: 8px;
}

.resultado div:last-child {
    margin-bottom: 0;
}

.resultado span {
    color: #667eea;
    font-weight: bold;
}

/* Responsivo */
@media (max-width: 768px) {
    .calculadora-container {
        margin: 10px;
        border-radius: 0;
    }
    
    .calculadora-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        flex: none;
        min-width: 100px;
        font-size: 12px;
        padding: 12px 8px;
    }
    
    .tab-panel {
        padding: 20px 15px;
    }
    
    .calculator-buttons {
        max-width: 100%;
    }
    
    .calculator-buttons button {
        height: 50px;
        font-size: 16px;
    }
    
    .calculator-display input {
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .calculadora-container h2 {
        font-size: 20px;
        padding: 15px 0;
    }
    
    .tab-button {
        font-size: 11px;
        padding: 10px 6px;
    }
    
    .calculator-buttons {
        gap: 8px;
    }
    
    .calculator-buttons button {
        height: 45px;
        font-size: 14px;
    }
}

/* Animaciones adicionales */
.calculadora-container * {
    box-sizing: border-box;
}

.form-row input:invalid {
    border-color: #dc3545;
}

.form-row input:valid {
    border-color: #28a745;
}

/* Efectos de hover mejorados */
.calculator-form input:hover,
.calculator-form select:hover {
    border-color: #adb5bd;
}

/* Loader para cálculos */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Estilos para errores */
.error {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Estilos para éxito */
.success {
    color: #28a745 !important;
    font-weight: bold;
}